Go Down

Topic: ATMega32 digitalRead and write trouble (Read 1 time) previous topic - next topic

supercrab

Yes, I have a pulldown resistor attached and I'm testing all the pins one at a time because I only have one switch circuit.
My Arduino 7 segment LCD/LED library

http://code.google.com/p/arduino-seven-segment/

spycatcher2k

Have you got pull up/down resisters installed?
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

supercrab

I've managed to get an Atmega32 bootloaded with the Arduino bootloader and the blink program works on a breadboard.  I've updated the core files including pins_arduino.c, I've also updated boards.txt too. The trouble is I can't read or write on analogue pins PA0 - PA7.   digitalWrite seems OK with the other pin but when using digitalRead with this code

Code: [Select]

for (int i=0; i<31; ++){
  Serial.print(i);
}
Seriail.println("");


I get output like this

[noting connected]
10011000000000000000000000000000

[try a pin]
10011000000111100000000000000000

[try adjacent pin]
10011000000111000000000000000000

[try adjacent pin again]
10011000000110000000000000000000

Any ideads what could be causing this?  Is the problem in the core or bootloader or somewhere else?

Thnanks
My Arduino 7 segment LCD/LED library

http://code.google.com/p/arduino-seven-segment/

Go Up