Toshiba H1 Series User Manual

Page 338

Advertising
background image

TMP92CZ26A

92CZ26A-335

c. Transmission and Receiving (Full Duplex Mode)

When Full Duplex Mode is used, set the Receive Interrupt Level to 0 and set enable

the level of transmit interrupt(1 to 6). Ensure that the program which transmits the
interrupt reads the receiving buffer before setting the next transmit data.
The following is an example of this:

Example:

Channel 0, SCLK output
Baud rate

= 9600 bps

fsys

= 2.4576 MHz

Main routine

7

6

5

4

3

2

1

0

INTES0

X 0

0

1

X

0

0

0

Set the INTTX0 level to 1.

Set the INTRX0 level to 0.

P9CR

X

X X X X 1

0

1

P9FC

− − X X X 1

X

1

Set P90, P91 and P92 to function as the TXD0,

RXD0 and SCLK0 pins respectively.

SC0MOD0

− −

0

0

Select I/O interface mode.

SC0MOD1

− 1

X

X X X X X

Select full duplex mode.

SC0CR

− −

0

0

SCLK0 output mode, select rising edge

BR0CR

0 0

0

1

1

0

0

0

Baud

rate

= 9600 bps.

SC0MOD0

− −

1

Enable receiving.

SC0BUF

*

*

*

*

*

*

*

*

Set the transmit data and start.

INTTX0 interrupt routine

A

CC

← SC0BUF

Read the receiving buffer.

SC0BUF

*

*

*

*

*

*

*

*

Set the next transmit data.

X: Don't care,

−: No change

Advertising
This manual is related to the following products: