Serial Interface Setup Examples; Setting Up Uart Transmission Using Serial Interface 0; Block Diagram Of Uart Transmission Using Serial Interface 0; Panasonic - Panasonic MN10285K User Manual

Panax series microcomputer
Table of Contents

Advertisement

Serial Interfaces

Serial Interface Setup Examples

You must use an 8-bit timer to
set the transfer clock. See sec-
tion 5.6.3, "Setting Up the Serial
Interface Clock," on page 135,
for an example setup.
MN102H75K/F75K/85K/F85K LSI User Manual
5.6
Serial Interface Setup Examples
5.6.1

Setting Up UART Transmission Using Serial Interface 0

This example illustrates serial transmission in the UART mode with the fol-
lowing settings:
B
= 24 MHz
OSC
Baud rate = 9600 bps (transfer clock set up with timer 0)
8-bit character length
Two stop bits
Odd parity
When a transmission end interrupt occurs, the next data byte is loaded.
P0
Interrupts
P2
P4
Timers 0-1
P6
Timers 2-3
Figure 5-9 Block Diagram of UART Transmission Using Serial Interface 0
Data transmission starts when the CPU writes data to the SC0TRB register. The
transmission start is synchronized to timer 0 underflow. An interrupt occurs when
transmission ends, and the next data byte is written to SC0TRB. If the application
does not use interrupts, it must poll the SC0TBY flag of the SC0STR register. It
can write the transmission data when SC0TBY is 0.
To set up the output port:
Set the P5MD5 bit of the port 5 output mode register (P5MD) to 1. This selects
the SBO0 pin as the serial interface output port.
P5MD (example)
Bit:
7
6
5
4
P5
P5
P5
P5
MD7
MD6
MD5
MD4
Setting:
0
1
0
0
131

Panasonic

CORE
ROM, RAM
Bus Controller
Serial I/Fs
ADC
3
2
1
0
P5
P5
P5
P5
MD3
MD2
MD1
MD0
0
0
0
0
Panasonic Semiconductor Development Company
P1
P3
P5
SBO0
x'00FFFA'

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mn102f75kMn102f85kMn102h75kMn102h85k

Table of Contents