Lec 5 Avr
Lec 5 Avr
Technology Nawabshah
#5
EMBEDDED SYSTEMS
The term AVR derives from its developers and stands for
Alf-Egil Bogen Vegard Wollan RISC microcontroller.
Applications
EEPROM
Home Automation
Automobiles
Touch screen
Medical devices
Defense
Education
Robots
Safety devices
Security alarm
Fire detection
AVR8515 (CATEGORY)
The IC has two buses namely one instruction bus and data bus.
The CPU core of the AVR consists of the ALU, General Purpose
Registers, Program Counter, Instruction Register, Instruction
Decoder, Status Register and Stack Pointer
AVR8515 (CPU)
I- Interrupt enable
T- Bit copy – bit load and bit store
H- Half carry
S- Sign
V- Overflow
N- Negative
Z- Zero
C- Carry
AVR8515 (Registers)
R7 R6 R5 R4 R3 R2 R1 R0
8-bit register can store number from 0 to 255 or from -128 to 127.
can’t run a program from it, but it is used as long time storage.
The EEPROM doesn’t get removed when the IC loses power, it’s
a great place for storing.
Data transfer
Arithmetic and Logical
Bit and Bit-Test
Control Transfer (Brach Instructions)
MCU Control
AVR8515 (ADD instruction)
ADD two registers and the contents of the C Flag and places the
result in the destination Rd.
Operation:
(i) Rd = Rd+ Rr + C
Perform the logical AND between the contents of Register Rd and Rr,
and places the result in the destination Rd.
Operation:
(i) Rd = Rd* Rr
Syntax Operands Program Counter
Shift all bits in Rd one place to the right. Bit 7 is held constant. Bit 0 is
loaded into the C lag of the SREG.
Operation:
(i) b7……….bo C