RS232 Full Duplex to Half Duplex

Is there any way to make the rs232 port on the 6812 to work like a half duplex port?

Reply to
ramkumar.sankar
Loading thread data ...

Yes: don't transmit while you're receiving.

For a better answer, you'll have to explain what you mean by "work like a half duplex port".

--
Grant Edwards                   grante             Yow!  My life is a patio
                                  at               of fun!
 Click to see the full signature
Reply to
Grant Edwards

Well I am not an expert on rs232 communication, but I was told by my professer that in half duplex rs232 there was only 1 wire between the two devices. What I am trying to do is control a device that works at

57600 baud rate but in Half Duplex mode. But when I was studying the diagrams for the device I am trying to control it has both a Tx and Rx wire. If anyone could point me in the direction of a good rs232 serial communication protocol document I would appretiate it.
Reply to
ramkumar.sankar

That's not correct - the RS-232 standard specifies the 25 pin connector between a DTE (Data terminal Equipment, a computer or terminal) and a DCE (Data Communication Equipment, a modem). The spec contains, among a lot of control lines, separate transmit and receive lines (even another pair for reverse channel).

If your RS-232 means the common misuse meaning in fact asynchronous serial byte-by-byte transfer, then the single data line configuration is possible. The connection is often called a party line: all receivers are connected directly to the line and all transmitters are connected via enabling/disabling gates to the line. The enable logic may be internal to the tranmit interface chip or a separate chip.

It's up to you to decide on the connection. You'll need some kind of interface chips anyway - the RS-232 standard signal levels are not compatible with the processor and UART signals directly.

If the RS-232 spec is not to be taken too literally, one solution is to use RS-485 connection and interface chips (Google for it). Please note that you need a couple of resistors to feed the idle state to the line when all transmitters are turned off.

--
Tauno Voipio
tauno voipio (at) iki fi
 Click to see the full signature
Reply to
Tauno Voipio

You are not after a protocol, but hardware specifications. RS232 is inherently full duplex (it has a send and a receive line, independent), but may be used in half duplex. RS485 is designed for half duplex hardware (i.e. a single transmission line, turned around when appropriate). So google for RS485. Also current loop can be very similar in usage.

Make sure you read and heed the advice in my sig below before making any replies. Then quote the relative portions, snip the rest, and DO NOT top-post. Your answer belongs after (or intermixed with) the material to which you reply.

--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on 
 Click to see the full signature
Reply to
CBFalconer

You're professor doesn't know what he's talking about.

Half duplex means that only one side transmits at a time. Half duplex RS-232 links don't use just 1 wire. They use the 2 data lines plus usually use RTS and CTS to control the link "direction".

Right. RS-232 data lines are not bidirectional, so if you want to both send and receive data, you'll need both of them. Additional handshaking lines such as RTS and CTS are often used to control the direction of data flow. The handshaking might also be done purely in software at the protocol level.

For what protocol?

I would suggest reading the documentation for the device you are attempting to control.

--
Grant Edwards                   grante             Yow!  I just heard the
                                  at               SEVENTIES were over!! And
 Click to see the full signature
Reply to
Grant Edwards

LOL!

Great answer, Grant. Made my morning!

Rufus

Reply to
Rufus V. Smith

Or maybe his professor meant a generic digital serial communication channel and he interpreted RS232. Notice he said "RS232 port on the 6812".

Regards.

Reply to
Elder Costa

The question sounds like (almost) overdue homework to me. You'd better ask for help on Google Oracle about RS-232.

First, the 6812 must have (I do not know it and did not check either) a serial port, not a RS232 port. The serial RX and TX lines are usually connected to drivers/receivers that convert TTL/C-MOS voltage levels to RS232 voltage levels and vice-versa. AFAIR RS232 regards to physical connections and voltage levels only.

RS485 (another standard) transceivers may be used in a half duplex configuration. Still the physical media is differential, therefore twisted pair based.

Despite it looks like "could somebody help me to do my homework" I will give you a hint anyway: one way to achieve what you want is using a tri-state buffer. How to connect it and the pros and cons of this configuration, as well as better ways to do it is up to you to figure out.

Regards.

Elder.

Reply to
Elder Costa

The 6812 is the same as RS-232. There's a transmit data pin and a receive data pin. For half-duplex, you've got to use both of them.

--
Grant Edwards                   grante             Yow!  My mind is making
                                  at               ashtrays in Dayton....
 Click to see the full signature
Reply to
Grant Edwards

Are you sure? I do not know this microcontroller in particular but most of them has asynchronous serial ports that comply with TTL or C-MOS levels, not RS-232. Therefore I would't call them RS-232.

Agreed. I think the both of us are talking about the same thing.

Regards.

Elder.

Reply to
Elder Costa

In regards to half/full duplex issue and the number/direction of data lines.

--
Grant Edwards                   grante             Yow!  I love FRUIT
                                  at               PICKERS!!
 Click to see the full signature
Reply to
Grant Edwards

Not sure what that was, but it sure doesn't sound like RS-232. If it was, the spec was being violated about six different ways.

Simplex means data only goes one way, so I doubt it.

Yes.

I've heard of people using various kludges to hook up multiple RS-232 drivers to a single receiver.

--
Grant Edwards                   grante             Yow!  O.K.! Speak with a
                                  at               PHILADELPHIA ACCENT!! Send
 Click to see the full signature
Reply to
Grant Edwards

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.