So the problem was related to something inside Arduino. And I have found it:
- Arduino RxD pins (any of them) seem to be declared as INPUT_PULLUP;
- My PicoLogic1284 has a 1K resistor in series and it doesn't read anything coming from there.
The solution has been to type something like this at the end of the setup routine:
void setup() { setupDisplay(); setupRTC(); setupIO(); mb.begin(9600); mb2.begin(19200); mb2.setTimeOut( 2000 ); u32wait = millis() + 1000; pinMode( RX2, INPUT ); }
RX2 is defined as the PD2, which is used as RXD1 for Serial1. This makes this input work without its internal pull-up resistor.
No comments:
Post a Comment