M68HC11
REFERENCE MANUAL
ASYNCHRONOUS SERIAL COMMUNICATIONS INTERFACE
MOTOROLA
9-5
shifter is enabled by the receive enable (RE) bit from the SCI control register 2
(SCCR2). The M bit from the SCCR1 register determines whether the shifter will be 10
or 11 bits long. After detecting the stop bit of a character, the received data is trans-
ferred from the shifter to the SCDR, and the receive data register full (RDRF) status
flag is set. When a character is ready to be transferred to the receive buffer but the
previous character has not yet been read, an overrun condition occurs. In the overrun
condition, data is not transferred and the overrun (OR) status flag is set to indicate the
error.
The wake-up block uses the WAKE control bit from SCCR1 to decide whether to use
the most significant bit (MSB) signal (address mark) or the ALL ONES signal (idle line)
to wake up the receiver. When the selected condition is detected, the wake-up logic
clears the receiver wake-up (RWU) bit in SCCR2, which wakes up the receiver.
There are three receiver-related interrupt sources in the SCI. These flags can be
polled by software or optionally cause an SCI interrupt request. The receive interrupt
enable (RIE) control bit enables the RDRF and the OR status flags to generate hard-
ware interrupt requests. The idle line interrupt enable (ILIE) control bit allows the IDLE
status flag to generate SCI interrupt requests.
9.2 SCI Registers and Control Bits
Primarily, the SCI system is configured and controlled by five registers (BAUD,
SCCR1, SCCR2, SCSR, and SCDR). In addition, the port D register, data direction
register for port D (DDRD), and the port D wired-OR mode bit in the SPI control regis-
ter (SPCR) are secondarily related to the SCI system. First, the main function of each
of these registers is presented, and then detailed descriptions of each bit are present-
ed.
When the SCI receiver and/or transmitter is enabled, the SCI logic takes control of the
pin buffers for the associated port D pin(s). Data directions for the RxD and TxD pins
are overridden to input and output, respectively. Even though it does not control the
direction of port D pins while the SCI has control, the DDRD can be important to a user
because it influences what will be read when port D is read by software. The DDRD
also determines how the pin will behave when the SCI gives up control. The port D
register is important to an SCI user because the value written to port D can determine
what will be driven out of port D when the SCI gives up control.
The port D wired-OR mode bit in the SPCR modifies the driver functions of port D pins,
even if they are being used for SCI or SPI functions.
The baud-rate control register (BAUD) is used to select the baud rate for SCI opera-
tions and contains two control bits for factory testing.
SCCR1 includes three bits associated with the optional 9-bit data format. The WAKE
bit is used to select one of two methods of receiver wake up.
SCCR2 contains the main SCI controls. The upper four bits are local interrupt enable
controls, which determine whether SCI status flags will be polled or will generate hard-
ware interrupt requests. The TE and RE bits are the respective transmitter and receiv-