I'm try to read the state of each switch on a DIP switch.
pinMode(19, INPUT); // Set pin to input
pinMode(18, INPUT); // Set pin to input
pinMode(15, INPUT); // Set pin to input
digitalWrite(19,HIGH); // enable internal pull-up
digitalWrite(18,HIGH); // enable internal pull-up
digitalWrite(15,HIGH); // enable internal pull-up
The digitalRead on pins 24 (D18) and 25 (D19) always returns LOW for some reason. D15 responds as expected, it only returns LOW when the switch is closed.
It also works fine when I connect the DIP switch to some other digital pins, instead of D18 and D19.
I'm using the Sanguino software
and upload the code using an Uno. At first I thought that it might have something to do with the JTAG interface being enabled, but the problem still occurs after disabling it by setting the fuses.
The reason that I want to use this pins is that I have a PCB that connects the DIP switch to these pins, so using other pins in no real option for me.
I must be missing something here...
EDIT: I attached the boards.txt file with the settings of the fuses and other settings as well.