Chapter 12Serial interface 0 and 1Operation XII - 25Note: Each setting in (5) can be set at the same time.(5) Set the SC0CTR registerSet the protocolSC0CTR(0x0000A100)bp11: SCA0PTL=0Set the first transfer bitSC0CTR(0x0000A100)bp9: SCA0OD=1Set the transfer bit countSC0CTR(0x0000A100)bp7: SCA0LN=1Set the parity bitSC0CTR(0x0000A100)bp6-4: SCA0PTY2-0=100Set the stop bitSC0CTR(0x0000A100)bp3: SCA0SB=1Set the clock sourceSC0CTR(0x0000A100)bp1-0: SCA0S1-0=11(5) Set the SCA0PTL flag of the SC0CTR register to “0” toselect the UART (start-stop) communication.Set the SCA0OD flag of the SC0CTR register to “1” toset the first transfer bit to MSB.Set the SCA0LN flag of the SC0CTR register to “1” toset the transfer bit count to 8 bits.Set the SCA0PTY2-0 flags of the SC0CTR register to“100” to select “ fixed at 0”.Set the SCA0SB flag of the SC0CTR register to “1” toset the stop bit to 2 bits.Set the SCA0S1-0 flags of the SC0CTR register to “11”to set the clock source to 1/16 of the timer 14underflow.(6) Enable the transmission/receptionSC0CTR(0x0000A100)bp14: SCA0REN=1bp15: SCA0TEN=1(6) Set the SCA0REN flag of the SC0CTR register to “1” toenable reception, and set the SCA0TEN flag to “1” toenable transmission.(7) Set the interrupt levelG13ICR(0x00008934)bp14-12: G13LV2-0=100(7) Set the interrupt level by the G13LV2-0 flags of theG13ICR register.(8) Enable the interruptG13ICR(0x00008934)bp8: G13IE0=1bp9: G13IE1=1(8) Set the G13IE0 flag of the G13ICR register to “1” and theG13IE1 flag to “1” to enable the interrupt. If an interruptrequest flags has been set already, clear the requestflag.(9) Start the serial transmissionTransmission data → SC0TB(0x0000A10C)Reception data → Input to the SBI0 pin(9) Transmission is started by setting transmission data tothe serial 0 transmission register (SC0TB). Whentransmission is completed, the serial 0 transmissioninterrupt (SC0TIRQ) is generated. Also, reception datais stored in the SBI0sbi0 pin and the serial 0 receptioninterrupt (SC0RIRQ) is generated.Setup Procedure Description