Serial InterfacesSerial Interface Setup ExamplesMN102H75K/F75K/85K/F85K LSI User Manual Panasonic Semiconductor Development Company131Panasonic5.6 Serial Interface Setup Examples5.6.1 Setting Up UART Transmission Using Serial Interface 0You must use an 8-bit timer toset the transfer clock. See sec-tion 5.6.3, “Setting Up the SerialInterface Clock,” on page 135,for an example setup.This example illustrates serial transmission in the UART mode with the fol-lowing settings:© B OSC = 24 MHz© Baud rate = 9600 bps (transfer clock set up with timer 0)© 8-bit character length© Two stop bits© Odd parityWhen a transmission end interrupt occurs, the next data byte is loaded.Data transmission starts when the CPU writes data to the SC0TRB register. Thetransmission start is synchronized to timer 0 underflow. An interrupt occurs whentransmission ends, and the next data byte is written to SC0TRB. If the applicationdoes not use interrupts, it must poll the SC0TBY flag of the SC0STR register. Itcan write the transmission data when SC0TBY is 0.n To set up the output port:Set the P5MD5 bit of the port 5 output mode register (P5MD) to 1. This selectsthe SBO0 pin as the serial interface output port.P5MD (example) x’00FFFA’Figure 5-9 Block Diagram of UART Transmission Using Serial Interface 0SBO0P0P2P4P6COREInterruptsTimers 0-1Timers 2-3ROM, RAMBus ControllerSerial I/FsADCP1P3P5Bit: 7 6 5 4 3 2 1 0P5MD7P5MD6P5MD5P5MD4P5MD3P5MD2P5MD1P5MD0Setting: 0 1 0 0 0 0 0 0