4. Block Diagram
Figure 4-1. Block Diagram
CPU
USART 0
ADC
ADC[7:0]
AREF
RxD0
TxD0
XCK0
I/O
PORTS
D
A
T
A
B
U
S
GPIOR[2:0]
SRAM
OCD
EXTINT
FLASH
NVM
programming
JTAG
I
N
/
O
U
T
D
A
T
A
B
U
S
TC 0
(8-bit)
SPI 0
AC
AIN0
AIN1
ACO
ADCMUX
EEPROM
EEPROMIF
PTC
X[15:0]
Y[31:0]
TC 1
(16-bit)
OC1A/B
T1
ICP1
TC 3
(16-bit)
TC 4
(16-bit)
OC3A/B
T3
ICP3
OC4A/B
T4
ICP4
TC 2
(8-bit async)
TWI 0
TWI 1
SDA0
SCL0
SDA1
SCL1
USART 1
USART 2
RxD1
TxD1
XCK1
RxD2
TxD2
XCK2
Internal
Reference
Watchdog
Timer
Power
management
and clock
control
VCC
GND
Clock generation
8MHz
Calib RC
128kHz int
osc
32.768kHz
XOSC
External
clock
Power
Supervision
POR/BOD &
RESET
TOSC2
XTAL2
RESET
XTAL1
TOSC1
16MHz LP
XOSC
TCK
TMS
TDI
TDO
Crystal failure detection
PCINT[38:0]
INT[2:0]
T0
OC0A
OC0B
MISO0
MOSI0
SCK0
SS0
OC2A
OC2B
PA[7:0]
PB[7:0]
PC[7:0]
PD[7:0]
PE[6:0]
SPI 1
MISO1
MOSI1
SCK1
SS1
Atmel ATmega324PB [DATASHEET]
Atmel-42546C-ATmega324PB_Datasheet_Summary-10/2016
7
5. Pin Configurations
Figure 5-1. Pinout ATmega324PB
Power
Ground
Programming/debug
Digital
Analog
Crystal/Osc
1
2
3
4
43
42
41
40
39
38
37
5
6
7
8
35
3422
21
20
19
18
17
36
9
10
11
12
13
14
15
16
AVCC
RESET
GND
VCC
(XTAL1) PE1
(XTAL2) PE0
PC7 (TOSC2)
PE4 (AREF)
GND
PB0 (PTCY/T0/XCK0)
PB1 (PTCY/T1/CLKO)
PB2 (AIN0/PTCY/INT2)
(MOSI0/ICP3/PTCY) PB5
(MISO0/OC3A/PTCY) PB6
44
32
31
30
29
28
27
26
24
23
25
33
(SCK0/OC3B/OC4B/PTCY) PB7
PB3 (AIN1/PTCY/OC0A)
PB4 (PTCY/OC0B/SS0)
PE5 (SDA1)
PE6 (SCL1)
PA0 (ADC0/PTCY)
PA1 (ADC1/PTCY)
PA2 (ADC2/PTCY)
PA3 (ADC3/PTCY)
PA4 (ADC4/PTCY)
PA5 (ADC5/PTCY)
PA6 (ADC6/PTCY)
PA7 (ADC7/PTCY)
PC6 (TOSC1)
PC4 (PTCXY/OC4A/TDO)
PC5 (PTCXY/ACO/TDI)
(TMS/ICP4/PTCXY) PC3
(TCK/T4/PTCXY) PC2
(SDA0/PTCXY) PC1
(SCL0/PTCXY) PC0
(MOSI1/TXD2/PTCXY) PE3
(MISO1/RXD2/PTCXY) PE2
(SCK1/XCK2/OC2A/PTCXY) PD7
(SS1/ICP1/OC2B/PTCXY) PD6
(OC1A/PTCXY) PD5
(XCK1/OC1B/PTCXY) PD4
(TXD1/INT1/PTCXY) PD3
(RXD1/INT0/PTCXY) PD2
(TXD0/PTCXY) PD1
(RXD0/T3/PTCXY) PD0
5.1. Pin Descriptions
5.1.1. VCC
Digital supply voltage.
5.1.2. GND
Ground.
Atmel ATmega324PB [DATASHEET]
Atmel-42546C-ATmega324PB_Datasheet_Summary-10/2016
8
5.1.3. Port A (PA[7:0])
This port serves as analog inputs to the Analog-to-digital Converter.
This is an 8-bit, bi-directional I/O port with internal pull-up resistors, individually selectable for each bit.
The output buffers have symmetrical drive characteristics, with both high sink and source capability. As
inputs, the port pins that are externally pulled low will source current if pull-up resistors are activated. Port
pins are tri-stated when a reset condition becomes active, even if the clock is not running.
5.1.4. Port B (PB[7:0])
This is an 8-bit, bi-directional I/O port with internal pull-up resistors, individually selectable for each bit.
The output buffers have symmetrical drive characteristics, with both high sink and source capability. As
inputs, the port pins that are externally pulled low will source current if pull-up resistors are activated. Port
pins are tri-stated when a reset condition becomes active, even if the clock is not running.
This port also serves the functions of various special features.
5.1.5. Port C (PC[7:0])
This is an 8-bit, bi-directional I/O port with internal pull-up resistors, individually selectable for each bit.
The output buffers have symmetrical drive characteristics, with both high sink and source capability. As
inputs, the port pins that are externally pulled low will source current if pull-up resistors are activated. Port
pins are tri-stated when a reset condition becomes active, even if the clock is not running.
This port also serves the functions of the JTAG interface, along with special features.
5.1.6. Port D (PD[7:0])
This is an 8-bit, bi-directional I/O port with internal pull-up resistors, individually selectable for each bit.
The output buffers have symmetrical drive characteristics, with both high sink and source capability. As
inputs, the port pins that are externally pulled low will source current if pull-up resistors are activated. Port
pins are tri-stated when a reset condition becomes active, even if the clock is not running.
This port also serves the functions of various special features.
5.1.7. Port E (PE6:0) XTAL1/XTAL2/AREF
This is a 7-bit bi-directional GPIO port with internal pull-up resistors (selected for each bit). The Port E
output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs,
Port E pins that are externally pulled low will source current if the pull-up resistors are activated. The Port
E pins are tri-stated when a reset condition becomes active, even if the clock is not running. PE0 and PE1
are multiplexed with XTAL1 and XTAL2 input. PE4 is multiplexed with AREF for the A/D Converter.
5.1.8. RESET
Reset input. A low level on this pin for longer than the minimum pulse length will generate a reset, even if
the clock is not running. Shorter pulses are not guaranteed to generate a reset.
5.1.9. AVCC
AVCC is the supply voltage pin for Port A, PE4 (AREF) and the Analog-to-digital Converter. It should be
externally connected to V
CC
, even if the ADC is not used. If the ADC is used, it should be connected to
V
CC
through a low-pass filter.
Atmel ATmega324PB [DATASHEET]
Atmel-42546C-ATmega324PB_Datasheet_Summary-10/2016
9

ATMEGA324PB-MN

Mfr. #:
Manufacturer:
Microchip Technology / Atmel
Description:
8-bit Microcontrollers - MCU 20MHZ, QFN/MFL, Extended TEMP, GREEN 5 V
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union