FPSLIC- Embedded Fixed Peripherals

Download Report

Transcript FPSLIC- Embedded Fixed Peripherals

FPSLIC- Embedded MCU Core
8 Bit RISC MCU
• Industry’s Highest 8-bit Performance
• A Real 8-Bit RISC Architecture
• Low Power ( idle/power down/power save )
• A broad Family of MCUs ( over 35 Products )
• A Variety of Peripherals
• Excellent C Language Code Density
• In-System Programmable SRAM
• Large Applications Database
Slide 1
AT94 Training 2001
Register File
• 32 Registers give good C
code density
• X, Y, Z pointers used by
compilers for high density C
code especially in loop
constructs and pointer based
code
R0
R1
R2
R3
R26
R27
R28
R29
R30
R31
XL
XH
YL
YH
ZL
ZH
X Pointer
Y Pointer
Z Pointer
Register File
Slide 2
AT94 Training 2001
Direct Register - ALU Connection
Register operations
take ONE clock pulse
on the EXTERNAL clock
input
Register File
ALU
Slide 3
AT94 Training 2001
Compare Two 32-Bit Values
Example: Compare R3:R2:R1:R0 and R7:R6:R5:R4
cp
cpc
cpc
cpc
r0,r4
r1,r5
r2,r6
r3,r7
At the end, the Status Register Indicates Equal,
Higher, Lower, Greater (signed), Less Than (signed).
Besides, it takes only 4 instructions and 4 clock
cycles to do it...
Slide 4
AT94 Training 2001
What makes the AVR better?
• Excellent support for 32/16-bit arithmetic's.
• (Zero-Flag) Propagation
• A lot of registers - eliminate moves to and from SRAM
• Single Cycle execution
• 127+ powerful instructions available
Slide 5
AT94 Training 2001
Subtract Two 16-Bit Values
Without Zero Flag Propagation
R1:R0 - R3:R2 ($E104 - $E101)
Slide 6
R1
R0
Z
E1
04
X
sub r0,r2
E1
03
0
sbc r1,r3
00
03
1
Wrong!
AT94 Training 2001
Subtract Two 16-Bit Values
With Zero Flag Propagation
R1:R0 - R3:R2 ($E104 - $E101)
Slide 7
R1
R0
Z
E1
04
X
sub r0,r2
E1
03
0
sbc r1,r3
00
03
0
Correct!
AT94 Training 2001
FPSLIC- Embedded Fixed Peripherals
UART0
Timer0
Timer1
Timer2
Slide 8
UART1
8 Bit RISC MCU
2-Wire
AT94 Training 2001
FPSLIC- Embedded Fixed Peripherals
UART Features
•
•
•
•
•
•
•
•
•
Slide 9
Full Duplex
8 or 9 Data Bits
Framing Error Detection
False Start Bit Detection
Noise Canceling
High BAUD Rates at low XTAL
Frequencies
E.g. 115,200 Baud at 1.8432 MHz
Can run at Practically any Baud Rate
Multi-processor Communication mode
Three Interrupts with Separate Vectors
UART0
UART1
AT94 Training 2001
FPSLIC- Embedded Fixed Peripherals
2 Wire interface Features
• Master/Slave support
• Transmitter/Receiver
• Up to 400Khz bus clock rate
UART0
UART1
8 Bit RISC MCU
Slide 10
2-Wire
AT94 Training 2001
FPSLIC- Embedded Fixed Peripherals
Timer/counter0
Timer0
• 8-Bit
• Overflow Interrupt
• Output Compare Function with
Interrupt
• 8-Bit PWM Function
8 Bit RISC MCU
Slide 11
2-Wire
AT94 Training 2001
FPSLIC- Embedded Fixed Peripherals
Timer/counter1
• 16-Bit
• Overflow Interrupt
• Output Compare Function with Interrupt
• Input Capture with Interrupt and Noise Canceler
• 10, 9 or 8-Bit PWM Function
Timer1
8 Bit RISC MCU
Slide 12
2-Wire
AT94 Training 2001
FPSLIC- Embedded Fixed Peripherals
Timer/counter2
Timer1
• 8-Bit
• Overflow Interrupt
• Output Compare Function with
Interrupt
• 8-Bit PWM Function
• Real Time Clock function ( Xtal2)
Timer2
8 Bit RISC MCU
Slide 13
AT94 Training 2001
FPSLIC- Embedded Fixed Peripherals
Timer0
Timer1
Timer2
Slide 14
8 Bit RISC MCU
UART0
Watchdog/Timer
• Clocked from Internal 1 MHz RC
Oscillator
• Time-Out Adjustable 47ms - 6s.
• Watchdog Timer Reset is done by
executing the “WDR” instruction
AT94 Training 2001
FPSLIC- Embedded Fixed Peripherals
Timer0
Timer1
Timer2
Slide 15
8 Bit RISC MCU
UART0
4 External Interrupts
• Short Response Time (4 Clock
Cycles + RJMP to Routine)
• Automatic Interrupt Flag Clearing
• Automatic Disable of Other
Interrupts Inside the Interrupt
Routine
AT94 Training 2001
FPSLIC- Embedded Fixed Peripherals
Hardware Multiplier
8x8 in 2 clock cycles
UART0
Timer0
Timer1
Timer2
Slide 16
UART1
8 Bit RISC MCU
2-Wire
AT94 Training 2001
FPSLIC- Embedded Fixed Peripherals
•
•
•
•
•
•
•
•
I/Os
Push-Pull Drivers
configurable Current Drive (6 or 20 mA)
Pinwise Controlled Pull-Up Resistors
Pinwise Controlled Data Direction
Fully Synchronized Inputs
Three Control/Status Bits per Bit/Pin
Real Read-Modify-Write
Up to 16 AVR I/Os (port D and E)
UART0
UART1
2-Wire
Slide 17
AT94 Training 2001
AVR Designs
AVR Studio
Instruction Set Simulator
Requires an Assembly or
C Compiler
8 Bit RISC MCU
•AVR Studio can be used with Assembly or C to debug code
•A HEX file is then used to program the AVR
Slide 18
AT94 Training 2001
C - COMPILER Support
( Can be Launched Directly from System Designer )
• IAR ( www.iar.se ) Approx. $1500
• ImageCraft ( www.imagecraft.com ) Approx. $200
• Codevision V1.0.1.4 (infotech.ir.ro) Approx. $150
• Others coming
Slide 19
AT94 Training 2001
FPSLIC-AVR Debugger
•
•
Easy to Use Windows
interface
C and Assembly
source level
debugging
•
Auto- stepping
•
Break points
•
Watch variables
•
View registers
•
View memory map
•
View processor states
•
View Peripheral states
•
Cycles/time count
Slide 20
AT94 Training 2001