Start/stop/idle bit value in RTU frame

M

Thread Starter

Mathieu L

Hi,

I am just beginning to use the Modbus protocol and I need some final informations. I just want to be sure I have well understood what I have just read in the docs.

I am using this configuration: RTU and no parity and want to send a request to one slave.

What I have understood is that I have to send 1 start bit and 2 stop bits every time I want to send 8 bits of data (I mean slave, function...).

But what I didn't find in the doc is what is the start/stop/idle bit value. I think it would be logic that the start/stop bits are different from the idle one. Is that true? If it is, is the idle value set to 1 or 0?

Thank you for your help.
 
A note about "No Parity" per the modbus spec. It is actually MARK parity, so it looks like 2 stop bits. But you can just use MARK parity and transmit 1 stop bit. Most UARTS do this.
 
A

Automation Linse

As others have mentioned you are actually sending a 1 Mark parity bit and 1 stop bits. AB/DF1 in 8,N,1 also does this.

However, direct to your question: in normal async an idle line is a "1" bit - RS-485 generally needs bias to force an idle line into this state when all transmitters are off/in tri-state.

The Start bit is defined by the fall from "1" to "0" (ie: is always "0" and this starts your async baud-rate machine to clock out the bits for this one character. The Stop bits will be "1" , but you'll only see a rise to it if the last data bit is "0" (or a "0" in parity field).

- LynnL, www.digi.com
 
Top