Serial interfaces, Set the sc0ten bit to 1 to enable transmission – Lucent Technologies MN10285K User Manual

Page 133

Advertising
background image

Serial Interfaces

Serial Interface Setup Examples

Panasonic Semiconductor Development Company

MN102H75K/F75K/85K/F85K LSI User Manual

132

Panasonic

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)

x’00FD80’

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)

x’00FC81’

SCT0ICL (example)

x’00FC82’

SCT0ICH (example)

x’00FC83’

Bit:

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

SC0

TEN

SC0

REN

SC0

BRE

SC0

I2CS

SC0
PTL

SC0

OD

SC0

I2CM

SC0

LN

SC0

PTY2

SC0

PTY1

SC0

PTY0

SC0

SB

SC0

S1

SC0

S0

Setting:

0

0

0

0

0

0

0

0

1

1

1

1

1

0

0

1

Bit:

7

6

5

4

3

2

1

0

ANLV2

ANLV1

ANLV0

ANIE

Setting:

0

1

0

1

0

0

0

0

Bit:

7

6

5

4

3

2

1

0

SCT0

IR

SCT0

ID

Setting:

0

0

0

0

0

0

0

0

Bit:

7

6

5

4

3

2

1

0

SCT0

IE

Setting:

0

0

0

0

0

0

0

1

Advertising
This manual is related to the following products: