Panasonic MN10285K User Manual page 133

Panax series microcomputer
Table of Contents

Advertisement

Panasonic Semiconductor Development Company
To set up serial interface 0:
1.
Configure the transmission settings in the serial port 0 control register
(SC0CTR). Since the transfer clock is timer 0 divided by 8, select timer 0
underflow x 1/8 as the serial port 0 clock source. Select UART mode, odd
parity, 2-bit stop bit, 8-bit data length, and LSB-first output. Also set the
SC0REN and SC0TEN flags to 0, disabling transmission and reception.
SC0CTR (example)
Bit:
15
14
13
12
SC0
SC0
SC0
SC0
SC0
TEN
REN
BRE
I2CS
PTL
Setting:
0
0
0
0
2.
Set the SC0TEN bit to 1 to enable transmission.
To enable serial 0 transmission end interrupts:
Cancel all existing interrupt requests. Next, set the interrupt priority level of 5 in
the ANLV[2:0] bits of the ANICH register, set the SCT0IE bit of SCT0ICH to 1,
and set the SCT0IR bit of SCT0ICL to 0. From this point on, an interrupt request
is generated whenever a serial data transmission ends.
ANICH: (example)
Bit:
7
6
5
4
ANLV2 ANLV1 ANLV0
Setting:
0
1
0
1
SCT0ICL (example)
Bit:
7
6
5
4
SCT0
IR
Setting:
0
0
0
0
SCT0ICH (example)
Bit:
7
6
5
4
Setting:
0
0
0
0
132
Panasonic
Serial Interface Setup Examples
11
10
9
8
7
6
SC0
SC0
SC0
SC0
OD
I2CM
LN
PTY2
0
0
0
0
1
1
3
2
1
0
ANIE
0
0
0
0
3
2
1
0
SCT0
ID
0
0
0
0
3
2
1
0
SCT0
IE
0
0
0
1
MN102H75K/F75K/85K/F85K LSI User Manual
Serial Interfaces
x'00FD80'
5
4
3
2
1
SC0
SC0
SC0
SC0
SC0
PTY1
PTY0
SB
S1
S0
1
1
1
0
0
x'00FC81'
x'00FC82'
x'00FC83'
0
1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mn102f75kMn102f85kMn102h75kMn102h85k

Table of Contents