how come the ATmega328 only has 12 I/O pins when other micros have 16 I/O pins....also can the anolog pins be used as digital I/O pins....
sorry for the dumb questions new at this arduino stuff.
Arduino I/O pins
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Arduino I/O pins
Actually, there are 14 digital pins. The Arduino uses pins 0 and 1 for serial communication, but you could re-purpose them if you don't need serial communication. And why not 16? It was probably an engineering decision based on fitting it into a 28 pin package.
The answer to the second question is yes. you can use analog pins as digital. When performing digital read/writes, they are addressed as pins 14-19.
The answer to the second question is yes. you can use analog pins as digital. When performing digital read/writes, they are addressed as pins 14-19.
-
- Posts: 34
- Joined: Tue Apr 19, 2011 1:24 pm
Re: Arduino I/O pins
hey, thanks for answering all my dumb questions
- floresta
- Posts: 223
- Joined: Thu Jul 31, 2008 10:27 am
Re: Arduino I/O pins
The 28-pin DIP version of the ATmega328 has 23 I/O pins. Two are typically used by the crystal and a third is used for reset leaving 20 available in most applications. On the Arduino these are implemented as 14 'Digital' pins (D0 - D13), and 6 'Analog' pins (A0 - A5).how come the ATmega328 only has 12 I/O pins when other micros have 16 I/O pins
Don
Please be positive and constructive with your questions and comments.