go away spammer

Author Topic: Sufficient I/O pins? Please help, need to order parts ASAP!  (Read 1469 times)

0 Members and 1 Guest are viewing this topic.

Offline XyverTopic starter

  • Robot Overlord
  • ****
  • Posts: 125
  • Helpful? 0
I'm working on a project, and I need 15 digital input pins (5 RGB LEDS), 6 digital input pins (buttons), and 1 analogue input (microphone).

But, I'm using an Arduino that is running a 328 ATmega chip.  On the Arduino, there are 14 digital I/O pins, and 6 analogue pins.   However, the 328 datasheet says it has 23 programable I/O pins (I need 22).  Can I make the 328 work?
« Last Edit: July 17, 2011, 11:26:20 PM by Xyver »

Offline billhowl

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 32
  • Your success is in your hands.
Re: Need more I/O Pins!
« Reply #1 on: July 16, 2011, 09:06:06 PM »
You can use the 1 analogue input and this library to control 6 buttons.
Quote
A library to connect more than 1 switch to a single Arduino analgue pin. Can pass a callback function (function pointer) to the constructor AnalogButtons, which gets called when a button event occurs (normal push down or hold down which can be configured for each button separately).
http://arduino.cc/playground/Code/AnalogButtons

The analog input pins can used as digital I/O pins
http://arduino.cc/en/Tutorial/AnalogInputPins
Try not to use digital input pins 0 and 1 as there are used for programming.

Offline XyverTopic starter

  • Robot Overlord
  • ****
  • Posts: 125
  • Helpful? 0
Re: Need more I/O Pins!
« Reply #2 on: July 16, 2011, 09:13:40 PM »
Yes, but I am just using an Arduino for the prototype.  When using a straight 328, there will be sufficient pins?  And how do you tell the chip which pin is which?  Just in the programming of it?

 


Get Your Ad Here