3 transmitting and detecting a break – Jameco Electronics Rabbit 3000 User Manual

Page 203

Advertising
background image

194

Rabbit 3000 Microprocessor

2. Clear bit 4 of the Parallel Port C function register so that the output no longer comes

from the serial port. Of course, this should not be done until the transmitter is idle.

A similar procedure can be used if the serial port is set up to use alternate output pins on
port D. Only Serial Ports A and B can use alternate outputs on Parallel Port D.

If an RS-485 driver is being used, dummy characters can be transmitted by disabling the
driver after the stop bit has been sent. This is an alternative to the above procedure.

12.9.3 Transmitting and Detecting a Break

A break is created when the output of the transmitter is driven low for an extended period.
If a break is received, it will appear as a series of characters filled with zeros and with the
9th bit detected low. This could only be confused with a legitimate message if a protocol
using the 9th bit was in effect. Break is not usually used as a message in such protocols.

A break can be transmitted by transmitting a byte of zeros at a very slow baud rate.
Another and probably better method is to disconnect the transmitter from the output pin,
and use the parallel port bit to set the line low while sending dummy characters to time out
the break.

The use of break as a signaling device should be avoided because it is slow, erratically sup-
ported by different types of hardware, and usually creates more problems than it solves.

12.9.4 Using A Serial Port to Generate a Periodic Interrupt

A serial port may be used to generate a periodic interrupt by continuously transmitting
characters. Since the Tx output via Parallel Port C or D can be disabled, the transmitted
characters are transmitted to nowhere. Because the character output path is double-buff-
ered, there will be no gaps in the character transmission, and the interrupts will be exactly
periodic. The interrupts can happen every 9, 10 or 11 baud times, depending on whether 7
or 8 bits are transmitted and on whether the 9th (8th) bit is sent.

12.9.5 Extra Stop Bits, Sending Parity, 9th Bit Communication Schemes

Some systems may require two stop bits. In some cases, it may be necessary to send a par-
ity bit. Certain systems, such as some 8051-based multidrop communications systems,
use a 9th data bit to mark the start of a message frame. The Rabbit 3000 can receive parity
or message formats that contain a 9th bit without problem. Transmitting messages with
parity or messages that always contain a 9th bit is also possible. It is quite easy to do so for
byte formats that use only 7 data bits, in which case the 9th bit or parity bit is actually an
8th bit. Sending a 9th low bit is supported by hardware. Sending a 9th bit as a high value
requires a write to the Serial Port A-F Long Stop Register (SxLR) which is the same as
two stop bits.

Advertising
This manual is related to the following products: