Perhaps you can help me from pulling out the few remaining hairs that I have left. I have a problem, that must be very simple to solve, and it has me almost beat!!
Using an Mega2560 chip and Arduino 0022 suite, and everything works great. I love it. I’ve used up all my hardware serial ports (GSM, GPRS, External device, and want to keep Serial0 reserved for USB programming). No problem you might say, especially with the NewSoftSerial library - particularly nice as it’s interrupt driven allows me as the programmer more freedom to in my main loop to do things rather than continually polling for receive data on my softserial-port.
Only problem is, that I cannot for the life of me get it working. Wiring etc should all be fine, I’ve used the same cables with two hardware ports and everything ok. But as soon as I connect to my software-port (I’m using pins 2 & 3), I can only transmit from my board to the PC, but cannot receive data into my board from the PC.
I’m using the nice simple examples provided (serial data in on one port then pass it out on the other, and vice-vearsa).
Is there something I’m missing? Do I need to set the pins up as inputs and outputs (I’ve tried this). Or do I need to enable interrupts somewhere? I’m not using my proper build, I’m now down to the dozen line example, and I’m really stuck.
Baud rates seem ok (measured on the scope). Data definitely being transmitted by the PC. Just seems that my software port is deaf.
Code included in case there’s something obvious.
SoftwareSerial mySerial(3, 2);
// set the data rate for the SoftwareSerial port
void loop() // run over and over
Any help would be very much appreciated.