
Serial Communications Interface (SCI)
MC9S12T64Revision 1.1.1
440
Serial Communications Interface (SCI)
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
NOTE:
The TDRE flag is set when the shift register is loaded with the next data
to be transmitted from SCIxDRH/L, which happens, generally speaking,
a little over half-way through the stop bit of the previous frame.
Specifically, this transfer occurs 9/16ths of a bit time AFTER the start of
the stop bit of the previous frame.
Writing the TE bit from 0 to a 1 automatically loads the transmit shift
register with a preamble of 10 logic 1s (if M = 0) or 11 logic 1s (if M = 1).
After the preamble shifts out, control logic transfers the data from the
SCI data register into the transmit shift register. A logic 0 start bit
automatically goes into the least significant bit position of the transmit
shift register. A logic 1 stop bit goes into the most significant bit position.
Hardware supports odd or even parity. When parity is enabled, the most
significant bit (msb) of the data character is the parity bit.
The transmit data register empty flag, TDRE, in SCI status register 1
(SCIxSR1) becomes set when the SCI data register transfers a byte to
the transmit shift register. The TDRE flag indicates that the SCI data
register can accept new data from the internal data bus. If the transmit
interrupt enable bit, TIE, in SCI control register 2 (SCIxCR2) is also set,
the TDRE flag generates a transmitter interrupt request.
When the transmit shift register is not transmitting a frame, the
TX
output
signal goes to the idle condition, logic 1. If at any time software
clears the TE bit in SCI control register 2 (SCIxCR2), the transmitter
enable signal goes low and the transmit signal goes idle.
If software clears TE while a transmission is in progress (TC = 0), the
frame in the transmit shift register continues to shift out. To avoid
accidentally cutting off the last frame in a message, always wait for
TDRE to go high after the last frame before clearing TE.
To separate messages with preambles of minimum idle line time, use
this sequence between messages:
1.
2.
Write the last byte of the first message to SCIxDRH/L.
Wait for the TDRE flag to go high, indicating the transfer of the last
frame to the transmit shift register.
Queue a preamble by clearing and then setting the TE bit.
3.
F
Freescale Semiconductor, Inc.
n
.