The Arduino Uno (based on the ATmega328P microcontroller) has the following pin configuration for digital and analog I/O:
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Digital Pins:
Total: 14 pins (labeled D0 to D13).
- 6 pins can be used as PWM outputs (marked with ~): D3, D5, D6, D9, D10, D11.
- 2 pins support hardware interrupts: D2 (INT0) and D3 (INT1).
- Serial communication: D0 (RX) and D1 (TX) for UART.
Analog Pins:
Total: 6 pins (labeled A0 to A5).
- These can read analog voltages (0–5V) via the 10-bit ADC (1024 values).
- Can also be used as digital I/O (if needed, addressed as D14 to D19).
Other Pins:
Power Pins:
5V, 3.3V, GND, VIN (input voltage).
Special Pins:
- AREF (Analog Reference voltage input).
- Reset (D0) – Can be used to reset the MCU.
Summary Table
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Example Uses
1. Digital:
- Read buttons/switches (digitalRead()).
- Control LEDs/relays (digitalWrite()).
2. Analog:
Read sensors (potentiometers, LDRs) (analogRead()).
3. PWM:
Dim LEDs, control servo motors (analogWrite()).
Important Notes
- A4 (SDA) and A5 (SCL) are also used for I²C communication.
- Avoid using D0/D1 if using serial (UART) communication.