MB95630H Series
468
FUJITSU SEMICONDUCTOR LIMITED
MN702-00009-2v0-E
CHAPTER 22 UART/SIO
22.6 Operations and Setting Procedure Example
●
Transmission in clock asynchronous mode (UART)
Use UART/SIO serial mode control register 1 ch. n (SMC1n) to select the serial data direction
(endian), parity/non-parity, parity polarity, stop bit length, character bit length, and clock.
Either of the following two procedures can be used to initiate the transmission process:
•
Set the transmission operation enable bit (TXE) to "1", and then write transmit data to the
UART/SIO serial output data register ch. n (TDRn) to start transmission.
•
Write transmit data to the UART/SIO serial output data register ch. n (TDRn), and then set
the transmission operation enable bit (TXE) to "1" to start transmission.
Transmit data is written to the TDRn register after it is checked that the transmit data register
empty flag bit (TDRE) set to "1".
When the transmit data is written to the TDRn register, the TDRE bit is cleared to "0".
The transmit data is transferred from the TDRn register to the transmission shift register, and
the TDRE bit is set to "1".
When the transmit interrupt enable bit (TIE) contains "1", a transmit interrupt occurs if the
TDRE bit is set to "1". This allows the next piece of transmit data to be written to the TDRn
register by interrupt handling.
To detect the completion of serial transmission by transmit interrupt, set the transmission
completion interrupt enable bits as follows: TEIE = 0, TCIE = 1. Upon completion of
transmission, the transmission completion flag bit (SSRn:TCPL) is set to "1" and a transmit
interrupt occurs.
The TCPL bit, and the TDRE bit in consecutive data transmission are set at the position which
the transmission of the last bit was completed (it varies depending on the data length, parity
enable, or stop bit length setting), as shown in Figure 22.6-6.
Note that modifying UART/SIO serial mode control register 1 ch. n (SMC1n) during
transmission may result in unpredictable operation.
Figure 22.6-6 Transmission in Clock Asynchronous Mode (UART)
UOn
D5
D6
D7
P
SP
SP
TCPL
TDRE
Transmit
interrupt
When the STOP bit length is set to 2 bits
When the STOP bit length is set to 1 bit
Содержание 8FX
Страница 2: ......
Страница 4: ......
Страница 8: ...iv ...
Страница 17: ...xiii A 3 Bit Manipulation Instructions SETB CLRB 621 A 4 F2 MC 8FX Instructions 622 A 5 Instruction Map 625 ...
Страница 18: ...xiv ...
Страница 22: ...xviii ...
Страница 108: ...MB95630H Series 86 FUJITSU SEMICONDUCTOR LIMITED MN702 00009 2v0 E CHAPTER 6 I O PORT 6 2 Configuration and Operations ...
Страница 284: ...MB95630H Series 262 FUJITSU SEMICONDUCTOR LIMITED MN702 00009 2v0 E CHAPTER 14 LIN UART 14 8 Notes on Using LIN UART ...
Страница 648: ...MB95630H Series 626 FUJITSU SEMICONDUCTOR LIMITED MN702 00009 2v0 E APPENDIX A Instruction Overview A 5 Instruction Map ...
Страница 650: ......