

ICP1 (Timer/Counter1 Input Capture Input) The PB1 pin can serve as an external interrupt source. OC1A (Timer/Counter1 Output Compare Match A Output) The PB2 pin can serve as an external interrupt source. This pin can serve as an external output for the Timer/Counter1 in Compare Match mode or PWM mode. OC1B (Timer/Counter1 Output Compare Match B Output) When the SPI is enabled as a Master, the data direction of this pin is controlled by DDB2. When the SPI is enabled as a Slave, this pin is configured as an input regardless of the setting of DDB2.

The PB3 pin can serve as an external interrupt source. This pin can serve as an external output for the Timer/Counter2 in Compare Match mode or PWM mode. OC2A (Timer/Counter2 Output Compare Match A Output) When the SPI is enabled as a Master, the data direction of this pin is controlled by DDB3. When the SPI is enabled as a Slave, this pin is configured as an input regardless of the setting of DDB3. The PB4 pin can serve as an external interrupt source. When the SPI is enabled as a Slave, the data direction of this pin is controlled by DDB4. When the SPI is enabled as a Master, this pin is configured as an input regardless of the setting of DDB4. The PB5 pin can serve as an external interrupt source. When the SPI is enabled as a Master, the data direction of this pin is controlled by DDB5. When the SPI is enabled as a Slave, this pin is configured as an input regardless of the setting of DDB5.

The PB6 pin can serve as an external interrupt source. In this mode, a crystal Oscillator is connected to this pin and used for asynchronous clocking of Timer/Counter1 and the pin cannot be used as an I/O pin.

When used as a clock pin, the pin can not be used as an I/O pin. Used for all chip clock sources except internal calibrated RC Oscillator. XTAL1 (Chip Clock Oscillator pin 1 or External clock input) The PB7 pin can serve as an external interrupt source. In this mode, a crystal Oscillator is connected to this pin and used for asynchronous clocking of Timer/Counter2 and the pin cannot be used as an I/O pin. Used as clock pin for Crystal Oscillator or Low-frequency Crystal Oscillator. If the Internal Calibrated RC Oscillator is used as the chip clock source, PB7…6 is used as TOSC2…1 input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is set. The Port B pins are tri-stated when a reset condition becomes active, even if the clock is not running.ĭepending on the clock selection fuse settings, PB6 can be used as input to the inverting Oscillator amplifier and input to the internal clock operating circuit.ĭepending on the clock selection fuse settings, PB7 can be used as output from the inverting Oscillator amplifier. As inputs, Port B pins that are externally pulled low will source current if the pull-up resistors are activated. The Port B output buffers have symmetrical drive characteristics with both high sink and source capability. Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). These pins are powered from the analog supply and serve as 10-bit ADC channels. In the TQFP and QFN/MLF package, ADC7:6 serves as analog inputs to the A/D converter. ADC7:6 (TQFP and QFN/MLF Package Only) (D21:D20 Arduino NANO) AREFĪREF is the analog reference pin for the A/D Converter. Note that PC6…4 use digital supply voltage, VCC. If the ADC is used, it should be connected to VCC through a low-pass filter. It should be externally connected to VCC, even if the ADC is not used. AVCCĪVCC is the supply voltage pin for the A/D Converter, PC3:0, and ADC7:6. GNDĭigital Supply Ground for the operation of the chip. Arduino UNO uses the PDIP package of ATmega328P and Arduino NANO uses the TQFP Package of ATmega328P.Īrduino NANO Pin Mapping with ATmega328P Pin Description ATmega328P VCCĭigital Supply Voltage for the operation of the chip.
#SDA SCL ARDUINO UNO PINOUT CODE#
Arduino Tutorial Embedded C Register Level Arduino Master ClassĪlso visit the Release Page for Register Level Embedded C Hardware Abstraction Library and Code for AVR.
