PDA

View Full Version : Can I parallel SIN/SOUT with UART's RX/TX Pins?



Jonmar
10-29-2009, 02:33 AM
Greetings all,

I need to hookup an external UART (MAX3110) to my BS2 for the FIFO buffer built in to the UART.
My project enclosure has only one DE9 connector cutout.
I would like to connect the SIN & SOUT pins in parallel with the UART's RX & TX pins.

The MAX3110 UART generates it's own +5V/-5V RS232 signal levels.

In normal operation the UART's RX & TX would be functioning under program control and no SERIN or SEROUT to port 16 would occur.

Data input routine is triggered by monitoring the /IRQ set to indicate when incoming data available.

When a field upgrade to the programming should be necessary, a computer RS232 cable would be connected and the ATN pin would be pulsed by the signal on the DTR line through the normal capacitor network to initiate a program download sequence.

Is there be any hardware problem with connecting the two pin sets together? Such as can the SIN & SOUT handle the +5V/-5V signals without damage?

Thanks in advance for any help.

Jonmar

allanlane5
10-29-2009, 03:08 AM
Would there be a problem using a double-pole double-throw switch to select one set or the other set?

The problem with what you propose is that the 3110 TX line would hold the BS2's TX line in an "idle" state. Connecting two RX lines in parallel should work, though.

The RS-232 driver standard does allow two drivers to connect this way without damage -- but that doesn't mean data won't be garbled.

I have seen something like this done by using 2 diodes -- one in each TX line -- kind of like a "wired-or" configuration. But this is VERY "non-standard".

Jonmar
12-08-2009, 07:50 AM
Greetings all,

For those who might be interested in how things turned out.
I ended up not using the RS232 Transmitter sections of the UART.
I am using port 16 SOUT to go to the TX pin on the RS232 connector.
I brought the RX line in to the MAX3110's RS232 Receiver, which feeds the UART input section, and the SIN pin of the Basic stamp.
I use two of the BS2's I/O ports for handling the DIN & DOUT of the MAX3110.
I use a third BS2 I/O port for the SCLK & /CS.
I set the SCLK line High until I want to start communicating with the MAX3110.
I have the Negative edge trigger of a 4538 one-shot monitoring the SCLK line.
The /Q output of the one-shot connected to the /CS input.
The time period of the one-shot is set, by the RC network, to be about 2.2mS
which is a little longer than the time it takes for my code routine to clock a data bit in and out of the MAX3110. (SPI bus Bi-directional protocol)
So that each time I lower the SCLK line, to complete a bit I/O, the one-shot re-triggers and keeps the UART selected.
I only use the UART's DIN to send it it's initialization control word for Power-on setup.
The DTR line, on the DE9 connector, still goes to the cap network that feeds the ATN pin on the BS2.

I ended up not using the /IRQ on the UART due to lack of available BS2 I/O ports.

The end result is a DE9 connector that, when hooked-up to the PC, can program the BS2 normally or
under program control, can receive RS232 serial data with an in-line eight byte FIFO so that I do not lose a serial command byte
while the BS2 is busy doing a previously commanded task.

Thanks for the input from "allanlane5" which helped me avoid a probably nasty mistake.

Jonmar

Post Edited (Jonmar) : 12/7/2009 11:58:43 PM GMT