106Views10Replies

Author Options:

Acess all 23 arduino pins? Answered

I have an arduino project that is pressd for pins, and I remembered that on Jameco, it mentions that it has 23 I/O pins.  http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_2129334_-1  I am wondering if anyone knows how to use these pins within the IDE (can I just address pin 20-22?, or is it more complicated), and which pins on the chip itself are they? 

Comments

The forums are retiring in 2021 and are now closed for new topics and comments.
0
frollard
frollard

8 years ago

There are 28 pins on the (arduino) AtMega328p chip, however many of them are not General Purpose IO (GPIO) Pins.

There is no 'easy' way to add more pins when they're already in use (Voltage, ground, Aref to name a few).

You can use port expanders, or multiplexers, or use shift registers, or matrices to use a few pins to drive a LOT of pins. It all depends on exactly what you're doing. A more advanced method involves charlieplexing - taking advantage of how some components are polarized, and some pins can be voltage sources or sinks. What are you trying to do exactly?

0
jduffy54
jduffy54

Answer 8 years ago

I didn't mean all 28, I am aware of power and ground connections and such. I was refferring to that the page states 23 dedicated I/O pins already on the ATmega. I cannot use charliplexing, and really just need to add a pin or two quickly and without buying stuff (I don't want to pay ~$10 in shipping just for two I/O pins). I just want to know if anyone already knows how to use those pins, not how to add more.

0
astroboy907
astroboy907

Answer 8 years ago

Also- taydaelectronics.com, really inexpensive stuff and shipping is generally less than $3 for a small order. Takes ~3 weeks for shipping though, depending on where you live might be closer to 2.

0
jduffy54
jduffy54

Answer 8 years ago

A) the other thing with removing the crystal is perfect
B) I don't want extra chips, even if its cheap
C) I don't have two weeks for delivery
D) I dont want to have to debug interfacing another chip, beyond those already involved.

0
astroboy907
astroboy907

Answer 8 years ago

This comes to mind, but it may be more trouble than what you were thinking..

0
jduffy54
jduffy54

Answer 8 years ago

Actually, that's perfect. Thanks. I don't really need precise timing for what I'm doing, and the extra two I/O are more than enough.

0
jduffy54
jduffy54

Answer 8 years ago

And by that I mean one more than enough.

0
frollard
frollard

Answer 8 years ago

That's fair -- is there ANY way to reduce your io requirements?

Consider asking for samples - lots of places will give handfulls of chips for free.

0
iceng
iceng

Answer 8 years ago

+1

0
steveastrouk
steveastrouk

8 years ago

If you have a proper SPI programmer, you could eliminate the crystal, and use the on chip clock, which gets you two pins, and you could use Tx and Rx. The only way to bring it back then is via the SPI pins.