Hands on Experience with AVR32 By: Mazhar Hussain mazhar.hussain @miun.se Muhammad Amir Yousaf 1
Tutorial Overview Introduction to AT32UC3A0512 (µ-controller) µ-controller Sensors Display Peripherals AVR Studio Getting Started Workspace creation Project creation Project building Target creation and Loading Program 2
µ-controller KIT Sensors Display Peripherals Published BY ATMEL 3
Lowest power Consumption (2xAA battery=19years) High Speed Clocked upto 66Mhz µ-controller KIT Sensors Display Peripherals Support High data throughput. High Speed Communication Interfaces USB up to 480 Mbit/s Ethernet up to 100 Mbit/s SPI up to 33 Mbit/s SSC up to 33 Mbit/s (I2S) USART up to 33 Mbit/s UART up to 4 Mbit/s I/O pin toggle up to 33 MHz One 8-channel 10-bit Analog-To-Digital Converter 4
µ-controller KIT Sensors Display Peripherals Published BY ATMEL 5
Introduction to Development Board µ-controller KIT Sensors Display EVK1100 Peripherals Evaluation kit and development system for the AVR32UC3A family EVK1100 is a fully functional embedded computer system. Circuit board has a flexible power system that accepts 8-20V DC input and can be operable via USB port. The EVK1100 embeds an Atmel Data flash (8MBytes) and a SDRAM (32MBytes). Several communication interfaces are available on the EVK1100: RS232, USB and ETHERNET. 6
µ-controller KIT Sensors Display Peripherals Sensor Name GPIO Names Alt. Function Used Light PA 23 ADC2 Temperature PA21 ADC0 Potentiometer PA22 ADC1 7
4x20 LCD to Design Human to Machine Interface for Soft. Development µ-controller KIT Sensors Display Peripherals LCD Pin GPIO Name Alt. Function 5 PA16 SPI1_MOSI 7 PA17 SPI1_MISO 6 PA15 SPI1_CLK 4 PA19 SPI1_CS2 18 PA18 PWM_6 8
On Board Peripherals: USB (2.0 mini A-B receptacle) Ethernet (External Ethernet Phy 10/100 and RJ45 connector) Atmel DataFlash (8 MBytes) SDRAM (32 MBytes) USARTs (Dual) LEDs on board (Six) Push Buttons (Three excluding Reset Push button) Joystick SD/MMC slot SPI (Two SPI interface one is dedicated for LCD one free) TWI (Two wire Interface) µ-controller KIT Sensors Display Peripherals 9
µ-controller KIT Sensors Display Peripherals A JTAG connector is provided to interface JTAGICE mkii (Programmer and debugger). EVK1100 provides three clock inputs for controller Main clock Oscillatior i.e 12MHz A spare clock Oscillator i.e 12MHz RTC clock at 32.768 KHz Block Diagram EVK1100 10
Expansion Connectors: >>SSC, PWM output 0 to 6,Timer A and timer B,TWI,ADC inputs line 0 to 7, SPI 0 to 1,USART 0 to 3,MAC,GPIO µ-controller KIT Sensors Display Peripherals 11
Tutorial Overview Introduction to Development Board µ-controller Sensors Display Peripherals AVR Studio Getting Started Workspace creation Project creation Project building Target Creation and Loading Program 12
AVR Studio Getting Started Start -> Program -> Atmel AVR Tools -> AVR32 Studio Workspace creation Project creation Project building Target Creation & Loading program 13
14
Running an Example Project Click File >> New >> Project >>AVR32 Example Project Workspace creation Project creation Project building Target Creation & Loading program Running your own Project Click File >> New >> Project >>AVR32 C Project From Template 15
Building a Project Select the project from the project plan (on left side of the window) and right click Click Build Project Workspace creation Project creation Project building Target Creation & Loading program Build complete for project myproject Debug directory will be added in the workspace myproject.elf will be created in the Debug directory and is ready to be loaded in the controller 16
For Programming EVK1100 there are three listed methods available, (Note: we can use two among them) In system Programming (ISP) Programming Via JTAG port Self Programming via One chip BOOT program Tool for using programming is JTAG or USB cable (for ISP) JTAG ICE mkii Workspace creation Project creation Project building Target Creation & Loading program 17
For Programming EVK1100 we need to add a Target Scan the target as shown in Picture Workspace creation Project creation Project building Target Creation & Loading program 18
Configure the target device i.e JTAGICE mkii for downloading your program Workspace creation Project creation Project building Target Creation & Loading program 19
Loading Code in the Micro-controller Loading through USB DFU Loading through JTAG On EVK1100 Press the joystick downwards and hold it. Now press the re-start button to put the device in programming mode Workspace creation Project creation Project building Target Creation & Loading program On AVR Studio Right-click on target for USB-programming and click program. Browse the target file and press ok in newly appeared window to start loading the program 20
Loading Code in the Micro-controller Loading through JTAG Workspace creation Project creation Project building Target Creation & Loading program Right click on JTAGICE mkii and click on Program. Browse the target.elf file and press ok to start loading 21
Thanks 22