problem with analog pins

hi !

i'am a beginner with arduino's and i got a weird problem, the analog pins of my arduino duemilanove aren't working

i'll explain : i have 2 arduino's, a duemilanove and a nano, i uploaded the SAME SKETCH (a fake bomb simulation for airsoft games) on both

when i wire my keypad and lcd on the nano, it is working fine, i can use the keypad to go down or up in the menu of the program

when i wire it the exact same way (same pins) on the duemilanove (which has, again, the same sketch as the nano) the menu is showing up on the lcd (as normal) but the keypad is not responding (any key)

i know it's not a wiring or sketch problem, so i tried this sketch :

void setup() { Serial.begin(9600); }

void loop() {

Serial.println(analogRead(A0)); delay(250);

}

i did this for each analog (a0 to a5) and on the serial monitor i have values around 230, and when i wire the 5V with the A0 i have a value of 1023 (same with each pin)

so what's the problem with the analog pins ?

How the heck is it wired? Why are you using analogRead() for a keypad? Are you doing the thing with resistors to do multiple switches on one pin? What are you trying to do?

Please post how you have it wired.

The test sketch and test sketch behavior you describe sound correct. When nothing is connected to the analog pin, the readings are meaningless because the pin is floating, and will pick up noise from local electromagnetic fields. Once it's connected to 5v, it correctly reads ~1023...

when i wire the 5V

Arduino Due analog pins can't handle 5V. At best, all the voltages between 3.3 and 5V will read as 1023, which probably means they won't work right in your keypad arangment. At worst, you may have burnt out any pin that you applied more than 3.3V to...

DrAzzy: How the heck is it wired? Why are you using analogRead() for a keypad? Are you doing the thing with resistors to do multiple switches on one pin? What are you trying to do?

Please post how you have it wired.

The test sketch and test sketch behavior you describe sound correct. When nothing is connected to the analog pin, the readings are meaningless because the pin is floating, and will pick up noise from local electromagnetic fields. Once it's connected to 5v, it correctly reads ~1023...

i'am not using analogread when keypad is wired, it was just a small sketch to test analog pins.

as said before, with the same sketch and same wiring on 2 different arduinos, the 1st is working perfectly but with the duemilanove the keypad connected to the analog pins is not working (it works on 1st board)

could it be possible that the chip of the board is defective ? i took a look at the soldering and everything is good there are no shorts between them

How is it wired?????

There is almost certainly a explanation, but without knowing how it is wired, I can't help you.

westfw: Arduino Due analog pins can't handle 5V. At best, all the voltages between 3.3 and 5V will read as 1023, which probably means they won't work right in your keypad arangment. At worst, you may have burnt out any pin that you applied more than 3.3V to...

He's not using a due, he's using a duemillanova or however the hell it's spelled, which is a 5v board.