2. INTRODUCTIONINTRODUCTION
• ATmega8 is a 8-bit microcontroller based on the AVR RISCATmega8 is a 8-bit microcontroller based on the AVR RISC
architecturearchitecture
• By executing powerful instructions in a single clock cycle, theBy executing powerful instructions in a single clock cycle, the
ATmega8 achieves throughput approaching 1 MIPS per MHzATmega8 achieves throughput approaching 1 MIPS per MHz
http://bestnetworkingsolutions.blogspot.in 2
3. Contd....Contd....
• In order to maximize performance and parallelism, the AVR uses aIn order to maximize performance and parallelism, the AVR uses a
Harvard architecture- which separates memories and buses forHarvard architecture- which separates memories and buses for
program and dataprogram and data
• Instruction in program memory are executed with single levelInstruction in program memory are executed with single level
pipeliningpipelining
• This concept enables instructions to be executed in every clockThis concept enables instructions to be executed in every clock
cyclecycle
http://bestnetworkingsolutions.blogspot.in 3
4. FEATURESFEATURES
• High-performance 8 bit MicrocontrollerHigh-performance 8 bit Microcontroller
• Up to 16 MIPS Throughput at 16 MHzUp to 16 MIPS Throughput at 16 MHz
• 32 x 8 General Purpose Working Registers32 x 8 General Purpose Working Registers
• Six ADC channels in PDIP packageSix ADC channels in PDIP package
• Internal Calibrated OscillatorInternal Calibrated Oscillator
http://bestnetworkingsolutions.blogspot.in 4
5. TYPES OF PACKAGESTYPES OF PACKAGES
• 28-pin PDIP (Plastic Dual In-line Package)28-pin PDIP (Plastic Dual In-line Package)
• 32-pin TQFP (Thin Quad film Package)32-pin TQFP (Thin Quad film Package)
http://bestnetworkingsolutions.blogspot.in 5
6. MEMORY SEGMENTSMEMORY SEGMENTS
• 8K Bytes of Flash program memory8K Bytes of Flash program memory
• 512 Bytes EEPROM (Electrically Erasable Programmable Read512 Bytes EEPROM (Electrically Erasable Programmable Read
Only Memory)Only Memory)
• 1K Byte Internal RAM (Random Access Memory)1K Byte Internal RAM (Random Access Memory)
http://bestnetworkingsolutions.blogspot.in 6
7. Contd....Contd....
• Write/Erase Cycles: 10,000 Flash/100,000 EEPROMWrite/Erase Cycles: 10,000 Flash/100,000 EEPROM
• Data retention: 20 years at 85°C/100 years at 25°CData retention: 20 years at 85°C/100 years at 25°C
http://bestnetworkingsolutions.blogspot.in 7
9. PIN DESCRIPTIONPIN DESCRIPTION
• VCCVCC Digital supply voltageDigital supply voltage
• GNDGND GroundGround
• RESETRESET A low level on this pin for longer than the minimum pulseA low level on this pin for longer than the minimum pulse
length will generate a reset, even if the clock is not runninglength will generate a reset, even if the clock is not running
• AREFAREF The analog reference pin for the A/D ConverterThe analog reference pin for the A/D Converter
http://bestnetworkingsolutions.blogspot.in 9
10. Contd....Contd....
• AVCCAVCC The supply voltage pin for the A/D ConverterThe supply voltage pin for the A/D Converter
http://bestnetworkingsolutions.blogspot.in 10
11. PORTSPORTS
• Three ports i.e PortB, PortC, PortDThree ports i.e PortB, PortC, PortD
• Three registers associated with every portThree registers associated with every port
DDRx – Data Direction RegisterDDRx – Data Direction Register
PINx – Port inputPINx – Port input
PORTx- Port outputPORTx- Port output
*Note – ‘x’ is subscript and could be either of B, C, D*Note – ‘x’ is subscript and could be either of B, C, D
http://bestnetworkingsolutions.blogspot.in 11
12. PORT B (PB7..PB0)PORT B (PB7..PB0)
• Port B is an 8-bit bi-directional I/O portPort B is an 8-bit bi-directional I/O port
• Can be used either as a input port or as output port ( directionCan be used either as a input port or as output port ( direction
must be specified in programming)must be specified in programming)
http://bestnetworkingsolutions.blogspot.in 12
13. REGISTER DESCRIPTION OF I/OREGISTER DESCRIPTION OF I/O
PORTSPORTS
http://bestnetworkingsolutions.blogspot.in 13
15. PORT C (PC5..PC0)PORT C (PC5..PC0)
• Port C is an 7-bit bi-directional I/O portPort C is an 7-bit bi-directional I/O port
• Can be used either as a input port or as output port ( directionCan be used either as a input port or as output port ( direction
must be specified in programming)must be specified in programming)
http://bestnetworkingsolutions.blogspot.in 15
16. PORT D (PD7..PD0)PORT D (PD7..PD0)
• Port D is an 8-bit bi-directional I/O portPort D is an 8-bit bi-directional I/O port
• Can be used either as a input port or as output port ( directionCan be used either as a input port or as output port ( direction
must be specified in coding)must be specified in coding)
http://bestnetworkingsolutions.blogspot.in 16