NEC 78K0S/KA1+ User Manual page 199

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0S/KA1+:
Table of Contents

Advertisement

(d) Continuous transmission
The next transmit data can be written to transmit buffer register 6 (TXB6) as soon as transmit shift register 6
(TXS6) has started its shift operation. Consequently, even while the INTST6 interrupt is being serviced after
transmission of one data frame, data can be continuously transmitted and an efficient communication rate
can be realized. In addition, the TXB6 register can be efficiently written twice (2 bytes) without having to wait
for the transmission time of one data frame, by reading bit 0 (TXSF6) of asynchronous serial interface
transmission status register 6 (ASIF6) when the transmission completion interrupt has occurred.
To transmit data continuously, be sure to reference the ASIF6 register to check the transmission status and
whether the TXB6 register can be written, and then write the data.
Cautions 1. The TXBF6 and TXSF6 flags of the ASIF6 register change from "10" to "11", and to "01"
during continuous transmission.
combination of the TXBF6 and TXSF6 flags for judgment. Judge whether continuous
transmission is possible or not by reading only the TXBF flag.
2. When the device is incorporated in a LIN, the continuous transmission function cannot
be used. Make sure that asynchronous serial interface transmission status register 6
(ASIF6) is 00H before writing transmit data to transmit buffer register 6 (TXB6).
TXBF6
0
1
Caution To transmit data continuously, write the first transmit data (first byte) to the TXB6
register. Be sure to check that the TXBF6 flag is "0". If so, write the next transmit
data (second byte) to the TXB6 register. If data is written to the TXB6 register while
the TXBF6 flag is "1", the transmit data cannot be guaranteed.
The communication status can be checked using the TXSF6 flag.
TXSF6
0
1
Cautions 1. To initialize the transmission unit upon completion of continuous transmission,
be sure to check that the TXSF6 flag is "0" after generation of the transmission
completion interrupt, and then execute initialization. If initialization is executed
while the TXSF6 flag is "1", the transmit data cannot be guaranteed.
2. During continuous transmission, an error may occur such that the next
transmission is completed before execution of INTST6 interrupt servicing after
transmission of one data frame. As a countermeasure, such an error can be
detected by developing a program that can count the number of transmit data and
by referencing the TXSF6 flag.
CHAPTER 11 SERIAL INTERFACE UART6
Writing to TXB6 Register
Writing enabled
Writing disabled
Transmission Status
Transmission is completed.
Transmission is in progress.
User's Manual U16898EJ3V0UD
To check the status, therefore, do not use a
199

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents