Hello,
i had build my own Arduino board (328p) and to verfiy not to have some digital ports connected, i wrote a small and dirty sketch.
Now the output tells me, pin 2 & 3 and 7&8 are connected. If pin 2 is set to high, pin 3 is high too. If pin 3 is high, pin 2 is low. Same for pin 7&8. The resitor between the pins are 10M.
I have no clue why.
New Pin ON: 2
Pin: 2 = 1
Pin: 3 = 1
Pin: 4 = 0
Pin: 5 = 0
Pin: 6 = 0
Pin: 7 = 0
Pin: 8 = 0
Pin: 9 = 0
Pin: 10 = 0
Pin: 11 = 0
Pin: 12 = 0
Pin: 13 = 0
New Pin ON: 3
Pin: 2 = 0
Pin: 3 = 1
Pin: 4 = 0
Pin: 5 = 0
Pin: 6 = 0
Pin: 7 = 0
Pin: 8 = 0
Pin: 9 = 0
Pin: 10 = 0
Pin: 11 = 0
Pin: 12 = 0
Pin: 13 = 0New Pin ON: 7
Pin: 2 = 0
Pin: 3 = 0
Pin: 4 = 0
Pin: 5 = 0
Pin: 6 = 0
Pin: 7 = 1
Pin: 8 = 1
Pin: 9 = 0
Pin: 10 = 0
Pin: 11 = 0
Pin: 12 = 0
Pin: 13 = 0
New Pin ON: 8
Pin: 2 = 0
Pin: 3 = 0
Pin: 4 = 0
Pin: 5 = 0
Pin: 6 = 0
Pin: 7 = 0
Pin: 8 = 1
Pin: 9 = 0
Pin: 10 = 0
Pin: 11 = 0
Pin: 12 = 0
Pin: 13 = 0
void setup() {
Serial.begin(9600);
Serial.println("Test Digital Pins");
for (int thisPin = 2; thisPin < 14; thisPin++) {
digitalWrite(thisPin, LOW);
pinMode(thisPin, INPUT);
}
}
void getinput() {
for (int thisPin = 2; thisPin < 14; thisPin++) {
Serial.print("Pin: ");
Serial.print(thisPin);
Serial.print(" = ");
int PinState = digitalRead(thisPin);
Serial.println(PinState);
}
}
void loop() {
for (int thisPin = 2; thisPin < 14; thisPin++) {
Serial.print("New Pin ON: ");
Serial.println(thisPin);
pinMode(thisPin, OUTPUT);
digitalWrite(thisPin, HIGH);
delay(50);
getinput();
delay(3000);
digitalWrite(thisPin, LOW);
pinMode(thisPin, INPUT);
delay(50);
}
delay(5000);
}
Thanks
zmoho