Microprocessor Based Design For Biomedical Applications: Ii: The Atmega8
Microprocessor Based Design For Biomedical Applications: Ii: The Atmega8
MBE 3 – MDBA
II : The ATmega8
Basic Features (1)
II: Atmega8 – Basic features
Peripheral Features
Operating Voltages
Speed Grades
● 0 - 8 MHz (ATmega8L)
● 0 - 16 MHz (ATmega8)
● Active: 3.6 mA
● Idle Mode: 1.0 mA
● Power-down Mode: 0.5 μA
II: Atmega8 – Basic features
Harvard architecture
Harvard architecture
Memory organization
II: Atmega8 – Basic features
● EEPROM - Memory:
32 GPR’s and
64 SFR’s mapped
to SRAM memory space
SFR’s accessed
via in / out instructions
(I/O-registers)
1 Kbytes of internal
SRAM can be accessed
from address 0x060
to address 0x45f
Clock Options
II: Atmega8 – Basic features
● The four CKSEL Bits of the FUSE – Byte select the main Clock Source
● The startup time to stabilize power supply and oscillator can be changed
I/O Ports
II: Atmega8 – Basic features
I/O Ports
I/O Ports
The Bits of these registers set the configuration for one Port Pin.
II: Atmega8 – Basic features
I/O Ports
General Digital IO
Logic of GPIO-Ports:
DDx
PORTx
PINx
Interrupt Processing
Reset-Vector and
Interrupt-Vectors
● Word addresses
0, 1 – 19 in Flash Ram
● When a reset or
interrupt occurs,
the CPU calls
the address
● Install an Interrupt
Handler: modify
the vector table to
jump to your user-
handler
Reset-Vector and
Interrupt-Vectors
● example shows
full featured
vector table
● 19 handlers installed
● program execution
after reset:
jmp RESET ($013)
● Main program is
located at $013,
beyond the vectors
II: Atmega8 – Basic features
Reset Sources:
Example:
Power-on Reset
Example:
Brown Out Reset
II: Atmega8 – Basic features
No prescaler
MAX=0xff
BOTTOM=0
Prescaler = 8
II: Atmega8 – Basic features