AVR ATMega32 Architecture
AVR ATMega32 Architecture
AVR ATMega32 Architecture
• Classic AVR
– e.g. AT90S2313, AT90S4433
• Mega
– e.g. ATmega8, ATmega32, ATmega128
• Tiny
– e.g. ATtiny13, ATtiny25
• Special Purpose AVR
– e.g. AT90PWM216,AT90USB1287
Let’s get familiar with the AVR part numbers
ATmega128
Atmel group
Flash
=128K
ATtiny44 AT90S4433
Atmel
Tiny Flash =4K Atmel Classi
Flash =4K
group c
group
ATMega32 Pin out & Descriptions
Port B
Clears all the
registers
Provides and
supply
Port A
restart
voltagethe
to the Reference voltage
These
chip. Itpins
execution arebe
of
should for ADC
Supply voltage for
used to connect
program
connected to +5 ADC and portA.
external crystal or
Connect it to VCC
RC oscillator
Port C
Port D
ATMega32 Pin out & Descriptions
ATMega32 Pin out & Descriptions
ATMega32 Pin out & Descriptions
Digital IO is the most fundamental mode of connecting a MCU to external world.
The interface is done using what is called a PORT. A port is the point where
internal data from MCU chip comes out or external data goes in. They are
present is form of PINs of the IC. Most of the PINs are dedicated to this function
and other pins are used for power supply, clock source etc . ATMega32 ports are
named PORT A, PORT B, PORT C and PORT D.
ATMega32 Pin out & Descriptions
Mega32/Mega16
(XCK/T0) PB0 PA0 (ADC0)
(T1) PB1 PA1 (ADC1)
(INT2/AIN0) PB2 PA2 (ADC2)
(OC0/AIN1) PB3 PA3 (ADC3)
(SS) PB4 PA4 (ADC4)
(MOSI) PB5 PA5 (ADC5)
(MISO) PB6 PA6 (ADC6)
(SCK) PB7 PA7 (ADC7)
PINA
PORTB
DDRB
PINB
RESET DDRA AREF
PORTA
VCC AGND
PORTC
GND DDRC AVCC
PINC
XTAL2 PC7 (TOSC2)
XTAL1 PC6 (TOSC1)
(RXD) PD0 PC5 (TDI)
(TXD) PD1 PC4 (TDO)
(INT0) PD2 PC3 (TMS)
(INT1) PD3 PC2 (TCK)
(OC1B) PD4 PC1 (SDA)
(OC1A) PD5 PC0 (SCL)
(ICP) PD6 PD7 (OC2)
ATMega32 Pin out & Descriptions
ATMega32 Pin out & Descriptions
Defining a pin as either Input or Output – The DDRx Registers