Go Down

Topic: I/O pins in Pro Mini vs. Uno (Read 2159 times) previous topic - next topic

danielNC

Sep 16, 2012, 02:45 pm Last Edit: Sep 16, 2012, 04:10 pm by danielNC Reason: 1
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.


James C4S


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.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

danielNC

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...

johnwasser


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: [Select]

Int button = analogRead(A7) > 512;
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

James C4S


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.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

tim7

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

CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

James C4S


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.)
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Go Up