RS232 communication. Can I use it to create a stable signal?

Honestly, I think the answer is no; however, I want a second opinion. Basically, I need one microcontroller device to send a constant signal to another, but the connection between them uses RS232. Therefore, I think I need to create / update communication messages in order to get it to do what I want.

What do you think?

+4
source share
8 answers

You should be able to set something like DTR (Data Terminal Ready), pin 20 or DSR (Ready Set Ready), pin 6, high and keep it there as your stationary signal. Thus, modems / terminals detect that there is a device at the other end that is ready for communication. It all depends on what level of access to hardware you have through your driver.

[EDIT] This is not related to sending data, although you can still do this using TX / RX, pins 2 and 3.

RS-232 link on wikipedia

+7
source

Do you mean fixed voltage? Not a square wave? (letter U) How about a break command (if you want to call it a command)?

Of course, you can use one of the control lines if this helps ... Or are you specifically looking for something from TX?

+3
source

If the question arises: โ€œCan I change the state of the DC of the Tx lineโ€, then the answer will be that many uarts (including on the PC) may ask to create a โ€œbreakโ€ condition, which is the opposite of the normal idle condition of the line.

So, you can enable and disable the โ€œbreakโ€ and enable this line.

+1
source

Perhaps this can be done if you are not against a pop-up interface. One micro could transmit a byte, and the other could do something with this byte and send it back in response.

0
source

If you can control both ends of the line, you can include the rs-232 tx and rx lines in regular logical lines to provide this information.

However, in most situations, each end periodically sends a status information byte containing 8 possible digital values โ€‹โ€‹โ€” giving much more status information.

The timer on the receiving side is reset each time a message is received, and if the timer expires, the message is too long and yo may act on a missing status message.

As others have pointed out, if you use hardware flow control, you also have some status lines, although in many cases these lines are not implemented, so this may not be an option.

-Adam

0
source

A steady signal may mean:

  • steady splash of characters: save send buffer completely
  • line held higher or lower: do not send anything or send continuous breaks
0
source

I think it depends a lot on the UART you use, for example. link text and the level of access that you have to it under the software. If you are checking a data sheet, methods for managing most contacts directly for testing purposes are often used, but you will need to switch to it from a fairly low level.

At a higher level, tvanfosson's answer pretty much depends on how I do it.

0
source

While the first answer is correct, it may not be possible to use this technique (using DTR or DSR) on many microcontrollers, as they may not have these signals (many microcontrollers may have only RX / TX main lines, and you often had to use other ports I / O, if you need additional control / status lines, but all is not lost, many RS232 controllers allow you to set the TX line to โ€œmarkโ€ or โ€œspaceโ€ (that is, set the TX line to a logical maximum or minimum), which allows wa to get a signal on the steady state. The line of the RX on the receiver can check if it is on the level or on the level of space.

0
source

All Articles