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 6543210
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
101
P9FC
− −
X
X
X
1X1
Set P90, P91 and P92 to function as the TXD0,
RXD0 and SCLK0 pins respectively.
SC0MOD0
− − − −
00
− −
Select I/O interface mode.
SC0MOD1
−
1X
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