Skip to main content

Microcontrollers

Section 4.5 Pinout Diagrams

The ATmega328P is available in multiple packages. Each one provides access to the microcontroller’s pins. As will be mentioned in Section 5.2, each of the I/O pins on the ATmega328P serves multiple purposes. This allows a pin to act either as an input/output interface or to provide a connection to a peripheral feature. In particular, pin PC6 can either be used as an active-LOW reset pin or as a general purpose I/O pin, depending on the fuse settings (described in Section 4.7). On the Arduino Uno R3, pin PC6 is used as an active-LOW reset and is connected to a pushbutton on the printed circuit board.
The supply pins include VCC, GND, AREF, and AVCC. The VCC pin must be connected to a proper operating voltage, which is between 2.7 V and 5.5 V. It is always recommended to use a bypass capacitor (a 100 nF ceramic capacitor will likely be adequate for the speeds at which the ATmega328P will be operated in a classroom setting) between power and ground connections in close proximity to the chip on any digital device operated at high frequencies. A bypass capacitor will reduce noise on the power and ground connections and provide a stable operating voltage.
The AREF pin is the reference voltage used with the analog to digital converter (ADC). The AVCC pin is used as a supply voltage for the ADC. This pin should be externally connected to VCC even if the ADC is not being used in a circuit design. If the circuit is not sensitive to noise, connect AVCC to VCC and insert a bypass capacitor between the pin and ground. If the circuit needs more extensive noise filtering, a low-pass filter should be connected to the pin in accordance with Figure 6.4.3. [16.14]
The pinout diagram of the ATmega328P’s 28-pin PDIP integrated circuit package is shown in Figure 4.5.1.
Pinout of the 28-pin PDIP. The pins are as follows. 1: PC6. 2: PD0. 3: PD1. 4: PD2. 5: PD3. 6: PD4. 7: VCC. 8: GND. 9: PB6. 10: PB7. 11: PD5. 12: PD6. 13: PD7. 14: PB0. 15: PB1. 16: PB2. 17: PB3. 18: PB4. 19: PB5. 20: AVCC. 21: AREF. 22: GND. 23: PC0. 24: PC1. 25: PC2. 26: PC3. 27: PC4. 28: PC5.
Figure 4.5.1. Pinout diagram for 28-pin PDIP package.
The pinout diagram for the 32-pin TQFP (thin quad flat package) integrated circuit package is shown in Figure 4.5.2.
Pinout of the 32-pin TQFP. The pins are as follows. 1: PD3. 2: PD4. 3: GND. 4: VCC. 5: GND. 6: VCC. 7: PB6. 8: PB7. 9: PD5. 10: PD6. 11: PD7. 12: PB0. 13: PB1. 14: PB2. 15: PB3. 16: PB4. 17: PB5. 18: AVCC. 19: ADC6. 20: AREF. 21: GND. 22: ADC7. 23: PC0. 24: PC1. 25: PC2. 26: PC3. 27: PC4. 28: PC5. 29: PC6. 30: PD0. 31: PD1. 32: PD2.
Figure 4.5.2. Pinout diagram for 32-pin TQFP package.
The pinout diagram for the 28-pad QFN (quad flat no-leads) integrated circuit package is shown in Figure 4.5.3.
Pinout of the 32-pad QFN. The pins are as follows. 1: PD3. 2: PD4. 3: VCC. 4: GND. 5: PB6. 6: PB7. 7: PD5. 8: PD6. 9: PD7. 10: PB0. 11: PB1. 12: PB2. 13: PB3. 14: PB4. 15: PB5. 16: AVCC. 17: AREF. 18: GND. 19: PC0. 20: PC1. 21: PC2. 22: PC3. 23: PC4. 24: PC5. 25: PC6. 26: PD0. 27: PD1. 28: PD2.
Figure 4.5.3. Pinout diagram for 32-pad QFN package.
The pinout diagram for the 32-pad QFN (quad flat no-leads) integrated circuit package is shown in Figure 4.5.4.
Pinout of the 28-pad QFN. The pins are as follows. 1: PD3. 2: PD4. 3: GND. 4: VCC. 5: GND. 6: VCC. 7: PB6. 8: PB7. 9: PD5. 10: PD6. 11: PD7. 12: PB0. 13: PB1. 14: PB2. 15: PB3. 16: PB4. 17: PB5. 18: AVCC. 19: ADC6. 20: AREF. 21: GND. 22: ADC7. 23: PC0. 24: PC1. 25: PC2. 26: PC3. 27: PC4. 28: PC5. 29: PC6. 30: PD0. 31: PD1. 32: PD2.
Figure 4.5.4. Pinout diagram for 32-pad QFN package.