Pages: [1]   Go Down
Author Topic: I/O pins in Pro Mini vs. Uno  (Read 2024 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 45
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a project where I have 16 LEDs and a RTC and a button connected to my UNO and I also used the lilypad.  Hooked the RTC to A4 and A5 and the button to pin 11.  I have been using pin 1 to drive an LED and one the program is uploaded, it works fine.

When building this exact project on the Pro Mini, I cannot get pin 1 in a low state to turn off the LED.  

I know A6 and A7 are an input only in this board, but I cannot get those pins to recognize the button input.  If I could relocate the button as in input to A6 or A7, then I could use Pin 11 to drive the LED.  Any thoughts?

Additionally, Are the SDA and SCL pins on the Mini Pro wired differently that the A4 and A5 pins?  Could I move my RTC to the SDA and SCL pins and then use A4 or A5 to drive the LED?

Thank in you advance.

« Last Edit: September 16, 2012, 09:10:00 am by danielNC » Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If I could relocate the button as in input to A5 or A7, then I could use Pin 11 to drive the LED.  Any thoughts?
Is your button wired up using a pull-up or pull-down resistor?

Additionally, Are the SDA and SCL pins on the Mini Pro wired differently that the A4 and A5 pins? 
I2C pins are still A4 and A5.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Offline Offline
Newbie
*
Karma: 0
Posts: 45
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I wired the A7 pin with a resistor (100k) running between it and the ground.  The button comes from VCC to the A7 pin.  i believe this is a "Pull Down" configuration.

Why does the function of Pin 1 differ on the Uno/Decil as opposed to the MiniPro?  I have been able to control Pin 1 (high/low) on the fulls size board, just not on the mini....  This is why I am trying to reconfigure everything.

DO I address A6 and A7 as pin number 20 and 21?  Can't find much info on this...
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8975
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

DO I address A6 and A7 as pin number 20 and 21?  Can't find much info on this...

A6 and A7 have no digital functions. Unlike A0 through A5 they don't share a pin with a digital I/O port. To use A7 as a digital input, try:

Code:
Int button = analogRead(A7) > 512;
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Why does the function of Pin 1 differ on the Uno/Decil as opposed to the MiniPro? 
It doesn't.  So something else is wrong.  Perhaps pin 1 is damaged.


DO I address A6 and A7 as pin number 20 and 21?  Can't find much info on this...
You address them like the another analog pins "A6" and "A7".  There are constants defined for all of the analog pins.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Switzerland
Offline Offline
Sr. Member
****
Karma: 6
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You know Pin-1 is labelled "TXO" on the Pro Mini, right?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27418
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't believe A6 and A7 are defined on the promini - but they are on the Nano? Fio?
Check those schematics, and try changing the board type that you select for programming.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't believe A6 and A7 are defined on the promini
Just to be clear, they are not defined on the schematic but the pins on the chip are available for use.

Code referencing them will compile.  (In fact, A6 and A7 "work" for the Uno as well.)
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Pages: [1]   Go Up
Jump to: