English
Language : 

MC68HC11P2 Datasheet, PDF (101/268 Pages) Motorola, Inc – Microcontrollers
Freescale Semiconductor, Inc.
Serial Communications Interface (SCI)
Status flags and interrupts
5.9 Status flags and interrupts
The SCI transmitter has two status flags. These status flags can be read
by software (polled) to tell when certain conditions exist. Alternatively, a
local interrupt enable bit can be set to enable each of these status
conditions to generate interrupt requests. Status flags are automatically
set by hardware logic conditions, but must be cleared by software. This
provides an interlock mechanism that enables logic to know when
software has noticed the status indication. The software clearing
sequence for these flags is automatic — functions that are normally
performed in response to the status flags also satisfy the conditions of
the clearing sequence.
TDRE and TC flags are normally set when the transmitter is first enabled
(TE set to one). The TDRE flag indicates there is room in the transmit
queue to store another data character in the transmit data register. The
TIE bit is the local interrupt mask for TDRE. When TIE is zero, TDRE
must be polled. When TIE and TDRE are one, an interrupt is requested.
The TC flag indicates the transmitter has completed the queue. The
TCIE bit is the local interrupt mask for TC. When TCIE is zero, TC must
be polled; when TCIE is one and TC is one, an interrupt is requested.
Writing a zero to TE requests that the transmitter stop when it can. The
transmitter completes any transmission in progress before shutting
down. Only an MCU reset can cause the transmitter to stop and shut
down immediately. If TE is cleared when the transmitter is already idle,
the pin reverts to its general-purpose I/O function (synchronized to the
bit-rate clock). If anything is being transmitted when TE is cleared, that
character is completed before the pin reverts to general-purpose I/O, but
any other characters waiting in the transmit queue are lost. The TC and
TDRE flags are set at the completion of this last character, even though
TE has been disabled.
MC68HC11P2 — Rev 1.0
Serial Communications Interface (SCI)
For More Information On This Product,
Go to: www.freescale.com
Technical Data