TMP91C824
91C824-146
Setting example: To link two slave controllers serially with the master controller using the
internal clock f
SYS
as the transfer clock.
TXD
Master
Slave 1
Slave 2
Select code
00000001
RXD
TXD
RXD
TXD
RXD
Select code
00001010
Since Serial Channels 0 and 1 operate in exactly the same way, Channel 0 only is used for the
purposes of this explanation.
•
Setting the master controller
Main
PCCR
←
− −
− −
− −
0 1
PCFC
←
− −
− −
− −
X 1
Set PC0 and PC1 to function as the TXD0 and RXD0 pins
respectively.
INTES0
←
1 1 0 0 1 1 0 1
Enable the INTTX0 interrupt and set it to Interrupt Level 4.
Enable the INTRX0 interrupt and set it to Interrupt Level 5.
SC0MOD0
←
1 0 1 0 1 1 1 0
Set f
SYS
as the transmission clock for 9-Bit UART Mode.
SC0BUF
←
0 0 0 0 0 0 0 1
Set the select code for slave controller 1.
INTTX0 interrupt
SC0MOD0
←
0
−
− −
− −
− −
Set TB8 to 0.
SC0BUF
←
* * * * * * * *
Set data for transmission.
•
Setting the slave controller
Main
P9CR
←
− −
− −
− −
0 1
P9FC
←
− −
− −
− −
X 1
PCODE
←
X X X X
−
X X 1
Set PC1 to RXD and PC0 to TXD0(open-drain output).
INTES0
←
1 1 0 1 1 1 1 0
Enable
INTRX0
and
INTTX0.
SC0MOD0
←
0 0 1 1 1 1 1 0
Set <WU> to 1 in 9-Bit UART Transmission Mode using f
SYS
as the
transfer clock.
INTRX0 interrupt
Acc
←
SC0BUF
if Acc = select code
Then SC0MOD0
←
- - - 0 - - - - Clear <WU> to 0.