[comp.dcom.modems] break condition

ANSCJEFF@UMCVMB.MISSOURI.EDU (Jeff Donaldson) (11/22/89)

On 20 Nov 89 10:35:25 GMT, Chris Jankowski writes:
>Subject: break condition, framing errors
>
>Can somebody explain what is break condition and where is it
>defined ie. in what standard?
>
>Just to start things off I will give you my intuitive understanding:
>
>When you press BREAK key on your terminal a voltage on one of the
>RS232C control lines is dropped (which line (?) and for how long (?)).
>A modem if present should detect this condition and pass it to
>the remote modem (by stopping to issue carrier (?) for how long (?)).
>The remote modem then should pass this condition by dropping
>voltage on one of its RS232C lines - again which (?) and for how long(?).
>This in turn may trigger some action in the receiving computer.
>
A BREAK condition is sent along the Transmit Data line just like the
stream of regular bits are.  In normal asynchronous transmission, the
"resting" condition is a Mark, or "1" voltage on the line.  To send a
character down the line, you send a start bit which is a "0" bit.  This
delimits the start of a byte.

Next follows the 8 or so data bits that make up the byte of the actual
character you're sending.  (Or, 7 data bits and a parity bit.)  At the
tail end comes a stop bit, which is a "1".  This returns the state of the
line back to its resting state, the Mark or "1" condition.

When you send a break, the UART (the chip in your COM port that converts
from parallel to serial) sends a series of "0" bits that last *longer*
than a byte normally would.  When the receiving port expects to see a
stop bit at the end of a byte's worth of time, it sees a "0" instead of
a "1".

The length of time used to send a break will be coded into the software
on your end (in the PC world).  In other words, your program says, "Break
on", <delay>, "Break off".

When the receiver sees a "0" when it's expecting a "1" stop bit, it checks
to see if all the characters before that are "0"'s.  If so, you have a
BREAK and it generates the appropriate signal.

In the PC world, this signal would involve setting a flag in the modem
status register then generating a hardware interrupt.

If any of the bits received before the anticipated stop bit were "1"'s,
the UART reports a framing error condition, since it assumes that if you
wanted to send a break, all the data bits would be "0".

As to the response on the system receiving the break, it's going to depend
on the application that is controlling I/O on their port.  It may be
ignored, or it could initiate an IPL.  Just depends on the program on
their end.

Since the break is simply a series of bits, it's sent over the RS232 "TD"
lead (as i mentioned earlier).  This is pin 2 on a DB25 connecter, or pin
3 on a DB9.  Normally, none of the other leads are affected.  If you have
your serial port hooked to a modem, the modem just transmits the bits as
it would "regular" stuff.

For more technical info about this stuff, check William Stallings' books,
"Handbook of Computer-Communications Standards" volumes 1 - 3.

Hope this helps!!

Jeff Donaldson
ANSCJEFF@UMCVMB.BITNET