I have a Sparkfun XBee kit, and mostly it has worked well on my Unos. I have remote serial comms working (although unfortunately not remote programming! ).
Now I have noticed the following relating the the switch position on the XBee shield:
- If the switch is in the DLINEposition (as for USB cable programming) the logic level on the digital input pins does not go to 0V. On pin 2, 'LOW" is 2.65 volts, which does not register as LOW. :o On pin 3, 'LOW' was 1.95V, which did trigger a LOW (I have only tested on pins 2 and 3)
- If the switch is in the other position, UART (for wireless serial), then the logic level behaves, LOW is about 0V, and the whole project works. :)
I have verified the above with various sensors, and with the XBee module in place in the shield, and also removed. Also verified with a 4 line program to eliminate the possibility of software issues. And finally, with another Uno. So it seems the issue is with the XBee shield.
My question is: What would cause this non-zero volt ‘low’? And how could I test to find and replace the faulty component?
If the switch is in the UART position (as for USB cable programming) the logic level on the digital input pins does not go to 0V. On pin 2, 'LOW" is 2.65 volts, which does not register as LOW. :o On pin 3, ‘LOW’ was 1.95V, which did trigger a LOW (I have only tested on pins 2 and 3)
Pins 2 &3. Are these the Serial UART pin between the XBee and the Unos?
Does this XBee shield use a diode on the XBe UART input pin?
I think I have understood the issue - pins 2 and 3 are the default pins used in DLINE mode. So that was ‘fighting’ with my use of the pin as an input, resulting in an intermediate voltage level.
So it seems to upload I need to switch to DLINE on the Xbee shield (to prevent interference with the bootloader on the Uno). But then pins 2 and 3 don’t work, so I cannot test unless I switch back to UART mode. A bit tedious, especially when access is an issue, but at least I understand now!
Perhaps a Sparkfun guru will be able to suggest a way to avoid having to flip the switch each upload?