Toshiba TMP91C815F Data Book page 146

16bit micro controller tlcs-900/l1 series
Table of Contents

Advertisement

In SCLK input mode, the data is shifted to Receiving Buffer 1 when the SCLK input becomes
active after the receive Interrupt flag INTES0 <IRX0C> is cleared by reading the received data.
When 8-bit data is received, the data will be shifted to Receiving Buffer 2 (SC0BUF according to
the timing shown below) and INTES0 <IRX0C> will be set again to be generate INTRX0 interrupt.
SCLK0 input
(<SCLKS> = 0: Rising Edge Mode)
SCLK0 input
(<SCLKS> = 1: Falling Edge Mdoe)
RXD1
IRX0C (INTRX0
interrupt request)
Figure 3.9.22 Receiving Operation in I/O interface Mode (SCLK0 Input Mode)
(note): The system must be put in the Receive Enable state (SCMOD0<RXE> = 1) before
data can be received.
$
Transmission and Receiving (Full Duplex Mode)
When the full duplex mode is used, set the level of Receive Interrupt to "0" and set enable the
interrupt level(1 to 6) to the transfer interrupt. In the transfer interrupt program, The receiving
operation should be done like the above example before setting the next transfer data.
Example: Channel 0, SCLK output
Main routine
INTES0
PCCR
PCFC
SC0MOD
0
SC0MOD
1
SC0CR
BR0CR
SC0MOD
0
SC0BUF
INTTX0 interrupt routine
Acc SC0BUF
SC0BUF
(note): X = Don't care; "−" = No change
bit 0
bit 1
Baud rate = 9600 bps
fc = 14.7456 MHz
System clock
: High frequency (fc)
Clock gear
: 1 (fc)
Prescaler clock : f
FPH
7
6
5
4
3
2
1
0
0
0
0
1
0
0
0
0
1
0
1
1
1
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
1
1
0
0
1
0
0
0
0
0
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
91C815-
bit 5
bit 6
Set the INTTX0 level to 1.
Set the INTRX0 level to 0.
Set PC0, PC1 and PC2 to function as the TXD0, RXD0 and
SCLK0 pins respectively.
Select I/O Interface Mode.
Select Full Duplex Mode.
SCLK out, transmit on negative edge, receive on positive
edge
Baud rate = 9600 bps
Enable receiving
Set the transmit data and start.
Read the receiving buffer.
Set the next transmit data.
143
TMP91C815
bit 7

Advertisement

Table of Contents
loading

Table of Contents