50
Flash-Based RISC Microcontrollers

Flash-Based RISC Microcontrollerseceweb.uccs.edu/~cwang/ECE4330_F04/AVR.pdf · Flash-Based RISC Microcontrollers. Flash Microcontrollers TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636

  • Upload
    dohuong

  • View
    219

  • Download
    0

Embed Size (px)

Citation preview

Flash-Based RISC Microcontrollers

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -2- June.2001

Key AVR Featuresi a Real 8-Bit RISC Architecturei Flash and EEPROM - in-system programmablei A variety of Peripheralsi Single cycle instruction execution, 32 working registersi Highest performance, low power 8-bit MCUi A broad family of MCUs - 1K to 128 Kbytes flashi Excellent code density in C and assembly

“AVR is RISC Performance with CISC Code Density”

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -3- June.2001

This is how it’s donei Four Memory Pointersi Linear (Non Paged) Memoriesi 32 General Purpose Registersi Harvard Architecturei True single external clock cycle executioni A very rich and powerful instruction seti Powerful data addressing modes optimized

for the C language

iJUMP

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -4- June.2001

AVR Register FileR0R1R2R3

R26R27R28R29R30R31

Register File

X Pointer

Y Pointer

Z Pointer

XLXHYLYHZLZH

BACKBACK

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -5- June.2001

Direct Register - ALU Connection

Register File

ALU

Register operationstake ONE clock pulseon the EXTERNAL clockinput

BACK

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -6- June.2001

Traditional Line

of Compromise

Speed

Code Density

TraditionalCISC

TraditionalRISC

Breaking Traditions

BACK

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -7- June.2001

Code Size Benchmarks

0

0,5

1

1,5

2

2,5

AVR Thumb H8/500 68HC11 Z80 80196 ARM7 H8/300H 80C51 H8/300

Nor

mal

ized

code

siz

e

i Accumulated and Normalized Resultsi Large Benchmark-suite of 9 Different Customer

Applicationsi Code Size Measured in Bytes for all MCUs

For further details, see www.atmel.com - products - avr - reference library

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -8- June.2001

Speed/performance Benchmarks

0000

5555

10101010

15151515

20202020

25252525

AVR Thumb ARM7 H8/500 H8/300H H8/300 80196 68HC11 Z80 80C51

Norm

aliz

ed

i Accumulated and Normalized Resultsi Large Benchmark-suite of 9 Different

Customer Applications

For further details, see www.atmel.com - products - avr - reference library

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -9- June.2001

Why Does the AVR Win theBenchmarks?

Code size– Architecture tuned for C– 32 working registers– Efficient 16/32-bit data support– Large and linear address spaces(8 mbyte)– Efficient bit manipulation

Speed/performance– Single clock cycle instructions– No clock division from XTAL to CPU– Powerful instruction set– Efficient 16/32-bit data support

JUMP

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -10- June.2001

The Three AVR Families

MemoryDensity

Features

( 1KB - 2KB )

( 1KB- 8KB )

( 8 KB - 128KB)

Fully Compatible

NOTE ON COMPETITION1. No competitor coverthis wide family range!

2. Competitors cover the range with incompatible families!

back

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -11- June.2001

AVR Peripherals

A closer look at some of the on-chip modules

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -12- June.2001

ARCHITECTURE

3 WIRE IN/OUT

ANALOGCOMP.

ALU

SERIALPERIPHERALINTERFACE

ADC

UART

WATCHDOGTIMER

I/OPORTS INTERRUPTS

TIMERCOUNTERS

INSTRUCTIONREGISTER

I/O MEM

PROGRAMCOUNTER

32 GENERALPURPOSE

REGISTERS

EEPROMFLASH

SRAM

LYGA98

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -13- June.2001

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -14- June.2001

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -15- June.2001

System Level Integration

i Power on reseti Brown-Out Detectioni Oscillatorsi Security control

On-Chip:

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -16- June.2001

I/O Ports General Features

i Push-Pull Driversi High Current Drive (sinks up to 20 mA)i Pinwise Controlled Pull-Up Resistorsi Pinwise Controlled Data Directioni Fully Synchronized Inputsi Three Control/Status Bits per Bit/Pini Real Read-Modify-Write

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -17- June.2001

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -18- June.2001

UART Featuresi Full Duplexi 8 or 9 Data Bitsi Framing Error Detectioni False Start Bit Detectioni Noise Cancelingi High BAUD Rates at low XTAL Frequencies

E.g. 115,200 BAUD at 1.8432 MHzi Generates the BAUD rate you needi Separate BAUD rate timeri Three Interrupts with Separate Vectors

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -19- June.2001

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -20- June.2001

ADC Featuresi 10-Bit resolutioni + 2LSB absolute accuracyi Single ended and differential input channel

with optional gaini Free-run and single conversion modesi Interrupt on conversion completei CPU Turn-Off Noise Reduction

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -21- June.2001

Internal Brown-out protection

iStops CPU during periods of low Vcc

– Prevents EEPROM corruption

– Prevents IO-lines from unexpected toggling

BACKBACK

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -22- June.2001

AVR Self Programming

• The ultimate In-System Re-programming solution• The AVR CPU writes directly to the Flash

– No external components

• In-System Re-program using UART, SPI, I2C, or customprotocols

• Perfect solution for “by-the-wire” remote upgrading– 1. Transfer the data over a ‘network’ to the system– 2. AVR receives data, writes to Flash, and upgrades itself !

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -23- June.2001

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -24- June.2001

Benefits with AVR Self ProgrammingiNo external components save costiFast programming time save production costiFull flexibility on programming schemes gives

the customer all choices on:– Speed, security and robustness

iTrue remote upgrading using existinginfrastructure for communication

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -25- June.2001

AVR - Market’s Best Self ProgrammingDevice AVR PIC16F87 PIC18Cx2 Hitachi H8xProgram Memory Flash Flash Eprom FlashSelf Programming Yes Yes Limited YesBoot Memory Type Flash Flash Eprom PROM/RAMWrite Time (16 KB) 1.3 sec. 33 sec. 5 sec. 1.8 sec.Write Time (128 B) 10 ms 512 ms 13 ms 1.0 sec.Prog. Voltage ISP 2.7-5.5V 4.5-5.5V 5V, 13V 5V, 12VSector Sizes 128 B 16 B UV-erase 4KB - 32KBFlexible Boot Size Yes No No No

Self Programming using Atmel’s Advanced Flash Technology

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -26- June.2001

Unique Features with AVR Self Programming

• Flexible Boot Block Sizes (128B - 2 KB)

• Smallest sector sizes, allows efficient data variablesmodifications–sector size is 128 Bytes

• Extremely fast programming time–10 ms for One Sector (128 Bytes)–16K (full Flash) in 1.3 sec.

• Program over the full temperature and voltageranges backback

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -27- June.2001

Power Consumption

• Active Default mode. Entered after Reset or Wake-up.

•Idle Entered after a SLEEP execution with SE bit in MCUCR register.

•Power-Down Entered after SLEEP execution with SM bit set in MCUCR register.

•Power-Save* Entered after a SLEEP execution with SM0 and SM1 bit set.

*Only for 32KHz AVR

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -28- June.2001

Active Mode

*CPU runs *All peripherals run

Tiny 15 Mega 163L 3.0 mA 3.0 mA

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -29- June.2001

Idle Mode *CPU is stopped

*XTAL oscillator runs

*Timer/Counters and other peripherals operate

*Reset and all enabled interrupts can wake-up the CPU

Tiny 15 Mega 163L 1.0 mA 1.2 mA

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -30- June.2001

Power-Down Mode *CPU is stopped

*XTAL is stopped

*Timer/Counters and other peripherals are stopped

*Reset and all enabled interrupts can wake-up the CPU Tiny 15 Mega 163L

9.0 uA <1uA 9.0 uA <1uA WDT enabled WDT disabled WDT enabled WDT disabled

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -31- June.2001

Power-Save Mode *CPU is stopped

*XTAL is stopped

*Timer/Counter0 and 32 KHz XTAL run

*All other peripherals are stopped

*Reset, Timer0 and external level interrupts can wake-up the CPU

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -32- June.2001

Wake-Up from Sleep Mode

i RESET The MCU Starts Execution from the Reset Vector

i INTERRUPT The MCU Enters the Interrupt Routine, Runs it and Resumes Execution from the Instruction

following “SLEEP”.

BackBack

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -33- June.2001

Currently Available AVR Products

S1200 S2323 S2343 S2313 S8515Pins 20 8 8 20 40/44Flash 1KB 2 KB 2 KB 2 KB 8 KBSRAM 0 128 B 128 B 128 B 512 BEEPROM 64B 128 B 128 B 128 B 512 BUART - - - Yes YesPWMs 0 0 0 1 2A/D C - - - - -RTC - - - - -Samples NOW NOW NOW NOW NOWProduction NOW NOW NOW NOW NOW

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -34- June.2001

S4433 C8535 C8534Pins 28/32 40/44 48Flash 4 KB 8 KB 8 KBSRAM 128 B 512 B 256 BEEPROM 256 B 512 B 512 BUART Yes Yes -PWMs 1 2 -ADC 6@10-bit 8@10-bit 6@10-bitRTC Yes Yes -Samples NOW NOW NOWProduction NOW NOW NOW

(2K - 8K with A/D converter)Currently Available AVR Products

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -35- June.2001

Currently Available Mega AVR Productsmega103 mega161 mega163 mega323

Pins 64 40/44 40/44 40/44Flash 128 KB 16KB 16 KB 32 KBSRAM 4 KB 1KB 1 KB 2 KBEEPROM 4 KB 512 B 1 KB 1 KBUART 1 2 1 1PWMs 4 2 3 4ADC 8@10-bit - 8@10-bit 8@10-bitRTC Yes Yes Yes YesSamples NOW NOW NOW NOWProduction NOW NOW NOW NOW

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -36- June.2001

The Tiny AVR familytiny11 tiny12 tiny15 tiny28 tiny26

Pins 8 8 8 28/32 20Flash 1KB 1 KB 1 KB 2 KB 2 KBSRAM 0 0 0 0 128 BEEPROM 0 64 B 64 B 0 128 BUART - - - - USIPWMs 0 0 1 1 2ADC - - 4 @10bit - 11@10-bitRTC - - - - -Samples NOW NOW NOW NOW Q4 2001Production NOW NOW NOW NOW Q1 2002

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -37- June.2001

New mega AVRsmega mega mega mega mega mega

8 16 32 128 8515 8535Pins 28/32 40/44 40/44 64 40/44 40/44Flash 8 KB 16 KB 32 KB 128 KB 8 KB 8 KBSRAM 1 KB 1 KB 2 KB 4 KB 512 B 512 BEEPROM 512 B 512 B 1 KB 4 KB 512 B 512 BUART Yes Yes Yes Yes Yes YesPWMs 3 3 4 6 2 2ADC 8@10-bit 8@10-bit 8@10-bit 8@10-bit - 8@10-bitTC 3 3 Yes 4 - -Samples Q3 2001 Q3 2001 Q4 2001 Q3 2001 Q4 2001 Q4 2001Production Q4 2001 Q4 2001 Q1 2002 Q4 2001 Q1 2002 Q1 2002

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -38- June.2001

Available Development Tools

i Assemblersi C-Compiler / Linkeri Simulator / Debuggersi Development Kitsi Programmersi In-Circuit Emulatori Application notes / FAQ

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -39- June.2001

ICE200 In-Circuit-Emulator

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -40- June.2001

ICE200• Real time and electrical emulation of:

– tiny11/12, 1200/2313, 4433, 4414/8515,4434/8535

• Unlimited number of breakpoints gives full C- leveldebugging

• Self Diagnostics helps the customer to “check”their ICE

• Supplied with all 5 DIL socket adapters included inthe price!

• Full of high end features that our customers love!

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -41- June.2001

SMD KIT !!

i Low Cost SMD Adapter Solution forICE200

i Kit contents– Target Adapters (2x) for SOIC8, SOIC20, TQFP44

and PLCC44– Personality Adapters for tiny12, 2313, 8515 and

8535

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -42- June.2001

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -43- June.2001

AVR Studio 3.5

i Integrated Development Environment (IDE)

• Source File Editor

• Watch View with Drag and Drop

• I/O View, Easy-to-use and Reconfigurable

• Supports all Atmel emulators,STK500

• Online HTML Help

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -44- June.2001

STK500

•Parallel and Serial High-Voltage Programming of AVR parts •Serial In-System Programming (ISP) of AVR Parts

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -45- June.2001

ICE10• New ICE for the TinyAVR Family

• ICEPRO Functionality including:

– Trace Buffer

– Trigger Inputs/Outputs

• Possible Upgrades

• Repair Service Available

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -46- June.2001

ICE30

i ICE for the mega AVR familyiPossible upgrades

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -47- June.2001

tiny1

0tin

y11

tiny1

2tin

y15

tiny2

2tin

y28

1200

2313

2323

2343

2333

4414

4433

4434

8515

8534

8535

mega3

2meg

a103

mega1

61meg

a163

Comments:

Starter KitsMCU00100 ! ! ! ! !STK100 ! ! ! ! ! ! HW is ready as is

STK200 ! ! ! ! ! ! ! ! ! ! ! TBD ! EOL

STK300 ! HW is ready as is

STK500 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! TBD TBD TBD TBD HW is ready as is

Starter kits

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -48- June.2001tiny

11tiny

12tiny

15tiny

28120

0231

3232

3234

3443

4851

5853

4853

5mega

32mega

103mega

163

Comments:

ProgrammersAVRISP ! ! ! ! ! ! ! ! ! ! !3'd party ! ! ! ! ! ! ! ! ! ! ! ! ! ! !

Programmers / Emulator Tools

tiny1

1tin

y12

tiny1

5tin

y28

1200

2313

2323

2343

4433

8515

8534

8535

meg

a32

meg

a103

meg

a163

Comments:

Emulation ToolsICE10 ! ! ! !ICE30 ! ! !ICE200 ! ! ! ! ! ! !ICEPRO ! ! ! ! ! ! ! ! ! !

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -49- June.2001tin

y11

tiny1

2tin

y15

tiny2

812

0023

1323

2323

4344

3385

1585

3485

35meg

a32

mega1

03meg

a161

mega1

63

Comments:

Software ToolsStudio 2.02 ! ! ! ! ! ! ! ! ! ! TBD ! TBD ! ! ! Enhanced AVR

Studio 3.5 ! ! ! ! ! ! ! ! ! ! TBD ! TBD ! ! ! Enhanced AVR

AVR Asm ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! Enhanced AVR

IAR Asm ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! Enhanced AVR

IAR C ! ! ! ! ! ! ! ! ! ! ! Enhanced AVR

ImagecraftTiny ! ! ! ! !Imagecraft ! ! ! ! ! ! ! ! ! ! !

Software Tools

Flash Microcontrollers

TOPTREND TECHNOLOGIES CORP. Tel: (02)2659-3636 E-mail : [email protected] -50- June.2001

iDatasheets and errata sheetsiApplication notesiFrequently asked questionsiSupport tools and softwareiThird party vendors

Www.Atmel.Com - Products - AVR