Sharing an RS-232 transmit line with a pushbutton

DSGarcia

New Member
I am using a micro stamp (BS2) to monitor an RS-232 input and then perform certain functions based on the input data received. It never needs to transmit serial data. The circuit does have a push button that will provide the +V input as an output (through a 10K resistor) when pressed.

I only have 5 pins that I can use (on an M12 connector). The entire circuit will be encapsulated in a potting compount.

During normal operations, this is enough for +V, Rx, Gnd, and the pushbutton output. However, I would also like to be able to reprogram the processor which requires the Tx line and the DTR (ATN) lines--which makes 6.

Because I only have 5 pins available on my connector, I would like the pushbutton output line to serve double duty and be used as the RS-232 Tx line during programming (and I will not press the button during this time).

How do I protect the idle RS-232 output from any effects from +V being applied by the pushbutton. I at first thought of using a diode but remembered that RS-232 generates +/- 12 volts and so that would not work.

I would have two different cables--the normal cable (no pin 5) and a special programming cable (that has the DTR signal connected to pin 5). Of course, pin 2 will be common to the pushbutton and the Tx line respectively.

One more thing... I have almost no room on the board. I.E., no room for a RS-232 transceiver dip.

Any ideas?

Thanks,
Dale
 
It makes more sense to piggy back the push button on the RX line. Set it up so that pushing it generates a break condition which you should be able to detect in the status register for the UART.

Build a 2nd board with the RS232 level shifter on it.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…