Hello, I'm following Ben Eater's 6502 breadboard computer
I'm hooking up the 16 address lines from the 6502 to the Arduino in order to see the values output to the serial monitor
here's my sketch:
const char ADDR[] = {22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52};
void setup() {
for (int n = 0; n< 16; n += 1) {
pinMode(ADDR[n], INPUT);
}
Serial.begin(57600);
}
void loop() {
for (int n = 0; n< 16; n += 1) {
int bit = digitalRead(ADDR[n]) ? 1 : 0;
Serial.print(bit);
}
Serial.println();
delay(500);
}
I have the clock for the 6502 paused, so only one value should be output, only one time... but the one value is being output continually over and over again.
perhaps my board is not setup correctly, but I can't figure it out, and could use some assistance please.
-- xed_over (Dennis)