Nova Scotia
Offline
Full Member
Karma: 2
Posts: 121
|
 |
« on: June 10, 2011, 08:20:20 am » |
I need as many I/O pins on the Arduiuno Mini Pro as possible. The info for this Arduino says it only has 14 Digital I/O but looking at the schemtic I see that PC0- PC5 = 6 , PD0-PD7 = 8 and PB0-PB6 = 6 I/O. This adds up to be 20 I/O. One of these has an LED on it and two are for the Rx/Tx for programming. Why does the doc say on 14 are available?
|
|
|
|
|
Logged
|
|
|
|
|
Dubuque, Iowa, USA
Offline
Edison Member
Karma: 13
Posts: 1539
|
 |
« Reply #1 on: June 10, 2011, 10:42:39 am » |
6 of the pins are analog and thus not described as "digital". They can still be used as digital I/O, so yes it does essentially have 20 I/O pins. Just a matter of how they're described is all.
|
|
|
|
|
Logged
|
|
|
|
|
Austin, TX
Offline
Faraday Member
Karma: 41
Posts: 5171
CMiYC
|
 |
« Reply #2 on: June 10, 2011, 04:34:52 pm » |
FYI... often overlooked, A4 and A5 on the Pro Mini are actually right above A3 and A2.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 243
Posts: 16515
Available for Design & Build services
|
 |
« Reply #3 on: June 11, 2011, 05:57:18 pm » |
If you're reeeeeally careful, you can get 2 more Analog inouts (only!), A6/A7, by adding wires to ATMega328 pins 19 & 22.
"In the TQFP and QFN/MLF package, ADC7:6 serve as analog inputs to the A/D converter. These pins are powered from the analog supply and serve as 10-bit ADC channels."
Not sure what you'd have to do software wise to access those.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Tesla Member
Karma: 71
Posts: 6611
Arduino rocks
|
 |
« Reply #4 on: June 11, 2011, 08:54:28 pm » |
And while you're at it connect to AREF (chip pin 20) too...
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 243
Posts: 16515
Available for Design & Build services
|
 |
« Reply #5 on: June 11, 2011, 08:56:33 pm » |
But Aref is not any good for an analog or digital IO pin?
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15316
Measurement changes behavior
|
 |
« Reply #6 on: June 11, 2011, 09:09:16 pm » |
And while you're at it connect to AREF (chip pin 20) too...
That's wrong. Unless you can show us in the datasheet where that is made possible, I can't. Lefty
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 243
Posts: 16515
Available for Design & Build services
|
 |
« Reply #7 on: June 11, 2011, 09:13:35 pm » |
Whatcha mean Lefty? Pin 20 on the TQFP is Aref, on the promini just has a cap to ground.
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15316
Measurement changes behavior
|
 |
« Reply #8 on: June 11, 2011, 09:25:30 pm » |
Whatcha mean Lefty? Pin 20 on the TQFP is Aref, on the promini just has a cap to ground.
I thought I was agreeing with your prior statement, Aref pin (on whatever package) can not be used as a general purpose I/O pin to the best of my knowlege and I did quickly check the datasheet but could be wrong. However the reset pin can be reused to use as I/O but that brings lots of arduino IDE compatiblity problems along with it. Or maybe I'm just not paying close enough attention to the post/question (again!) ??? Lefty
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Tesla Member
Karma: 71
Posts: 6611
Arduino rocks
|
 |
« Reply #9 on: June 11, 2011, 09:31:15 pm » |
No it can't, however the AREF pin can be useful - and the Mini Pro annoyingly doesn't bring it out to a pad...
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 243
Posts: 16515
Available for Design & Build services
|
 |
« Reply #10 on: June 11, 2011, 11:50:12 pm » |
Okay, I think we're all in sync - OP recognizes the 20 I/O lines, there is a way to add 2 more Analog Input lines, and Aref if connected also could be useful (as part of analog reads).
|
|
|
|
|
Logged
|
|
|
|
|
|