English
Language : 

Z8F1680SH020SG Datasheet, PDF (172/412 Pages) Zilog, Inc. – High-Performance 8-Bit Microcontrollers
Z8 Encore! XP® F1680 Series
Product Specification
147
6. Check the TDRE bit in the LIN-UART Status 0 Register to determine if the Transmit
Data Register is empty (indicated by a 1); if empty, continue to Step 7. If the Transmit
Data Register is full (indicated by a 0), continue to monitor the TDRE bit until the
Transmit Data Register becomes available to receive new data.
7. If operating in MULTIPROCESSOR Mode, write to the LIN-UART Control 1 Regis-
ter to select the outgoing address bit.
– Set the Multiprocessor Bit Transmitter (MPBT) if sending an address byte; clear it
if sending a data byte.
8. Write the data byte to the LIN-UART Transmit Data Register. The transmitter auto-
matically transfers the data to the Transmit Shift Register and transmits the data.
9. If appropriate – and if MULTIPROCESSOR Mode is enabled – changes can be made
to the Multiprocessor Bit Transmitter (MPBT) value.
10. To transmit additional bytes, return to Step 5.
12.1.3. Transmitting Data Using Interrupt-Driven Method
The LIN-UART Transmitter interrupt indicates the availability of the Transmit Data
Register to accept new data for transmission. Observe the following steps to configure the
LIN-UART for interrupt-driven data transmission:
1. Write to the LIN-UART Baud Rate High and Low Byte registers to set the appropriate
baud rate.
2. Enable the LIN-UART pin functions by configuring the associated GPIO port pins for
alternate function operation.
3. Execute a DI instruction to disable interrupts.
4. Write to the interrupt control registers to enable the LIN-UART Transmitter interrupt
and set the appropriate priority.
5. If MULTIPROCESSOR Mode is appropriate, write to the LIN-UART Control 1 Reg-
ister to enable MULTIPROCESSOR (9-bit) Mode functions.
6. Set the MULTIPROCESSOR Mode Select bit (MPEN) to enable MULTIPROCES-
SOR Mode.
7. Write to the LIN-UART Control 0 Register to:
a. Set the transmit enable bit (TEN) to enable the LIN-UART for data transmission.
b. If MULTIPROCESSOR Mode is not enabled, then enable parity if appropriate
and select either even or odd parity.
c. Set or clear the CTSE bit to enable or disable control from the remote receiver via
the CTS pin.
PS025015-1212
PRELIMINARY
LIN-UART