Author Topic: Sufficient I/O pins? Please help, need to order parts ASAP!  (Read 513 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: 370
  • 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?

 

Related Topics

  Subject / Started by Replies Last post
16 Replies
4830 Views
Last post July 24, 2007, 07:35:40 PM
by HDL_CinC_Dragon
9 Replies
2916 Views
Last post February 08, 2009, 09:08:53 AM
by Joesavage1
10 Replies
2477 Views
Last post March 03, 2009, 08:52:01 PM
by offy
6 Replies
1007 Views
Last post February 03, 2011, 03:23:54 AM
by Joker94


Get Your Ad Here