I am using an Arduino and an RS-232 to TTL adapter to interface with my Tandy/Radio Shack TRS-80 Color Computer. My project, SirSound, is a sound chip controlled via the serial printer port.
Microsoft COLOR BASIC has build in commands to send output to the printer, such as:
PRINT #-2,"This will go to the printer"
To prevent sending data when the printer is not ready, it uses the RX pin of the serial printer port for flow control. When the printer is ready, that line goes LOW letting the computer know it can send data. When the printer is not ready, or offline, the line is HIGH, and BASIC will hang/pause until it is ready.
I planned to do this in my project as well, so BASIC can't send data when the buffer is full.
It seems that SoftwareSerial does not let me hijack that RX pin. I have something like this:
#define TX_PIN_COCO A4
#define RX_PIN_COCO A5
SoftwareSerial CoCoSerial(RX_PIN_COCO, TX_PIN_COCO); // RX, TX
In order to control the TX pin, I need to do:
pinMode(TX_PIN_COCO, OUTPUT);
digitalWrite(TX_PIN_COCO, LOW); // Ready!
...and then I toggle it LOW or HIGH depending on if I am ready for more data from the computer.
I am doing this just fine using a "ReceiveOnlySofwareSerial" modification Nick Gammon did:
http://forum.arduino.cc/index.php?topic=112013.msg1919710#msg1919710
These modifications were done by folks who wanted to save a pin. In my case, I still want to be able to send and receive in an interactive mode, but the normal mode would be receive-only with the flow control.
I thought I'd ask here if there might be a way to do what I want with the stock SoftwareSerial library. I've glanced at the source a bit, and it didn't look like it would be doing anything if nothing was being sent, so I thought it would work.
Suggestions appreciated.