Chapter 5 Serial Functions1015-3 Half-duplex UART Serial Interface5-3-1 OverviewSetup and operation of UART transmission and reception are describedbelow.5-3-2 Setup and Operationn Transmission(1) Select UART by setting the SC0CMD flag of the serial interface 0 controlregister (SC0CTR) to "1."(2) Specify the first bit to be transferred (MSB first or LSB first) with theSC0DIR flag of the serial interface 0 mode register 0 (SC0MD0).(3) Select the valid edge of the clock signal with the SC0CE1 to 0 flags of theSC0MD0 register.(4) Select the clock source with the SC0CK1 to 0 flags of serial interface 0mode register 1 (SC0MD1).(5) Set the SC0CKM flags of the SC0MD1 register to "1" to divide the clocksource frequency by 8.(6) Set the SC0NPE flag of the serial interface 0 mode register 2 (SC0MD2) toenable or disable parity.Half-duplex UART Serial InterfaceWhen the serial port is enabledand the SC0CE1 to 0 flags ofthe SC0MD0 register aretoggled, the transfer bit countmay change.The TXD pin goes to a highlevel after transmission iscomplete.Setting the SC0FM flag of the SC0MD2 register to framemode automatically sets the SC0LNG2 to 0 flags of theSC0MD0 register.After the transfer is complete, the SC0LNG2 to 0 flags of theSC0MD0 register are automatically set with the transfer bitcount.Set the SC0CKM flag of the SC0MD1 register to "1" to dividethe clock source frequency by 8.