Hitachi H8/3664 Hardware Manual page 291

Table of Contents

Advertisement

Transmitting: Figure 14.6 shows an example of a flowchart for data transmission. This procedure
should be followed for data transmission after initializing SCI3.
Read bit TDRE
1
in SSR
TDRE = 1?
Write transmit
data to TDR
Continue data
2
transmission?
Read bit TEND
in SSR
TEND = 1?
3
Break output?
Set PDR = 0,
PCR = 1
Clear bit TE to 0
in SCR3
Figure 14.6 Example of Data Transmission Flowchart (Asynchronous Mode)
Start
No
Yes
Yes
No
No
Yes
No
Yes
End
1.
Read the serial status register (SSR)
and check that bit TDRE is set to 1,
then write transmit data to the transmit
data register (TDR). When data is
written to TDR, bit TDRE is cleared to 0
automatically.
2.
When continuing data transmission,
be sure to read TDRE = 1 to confirm that
a write can be performed before writing
data to TDR. When data is written to
TDR, bit TDRE is cleared to 0
automatically.
3.
If a break is to be output when data
transmission ends, set the port PCR to 1
and clear the port PDR to 0, then clear bit
TXD in PMR7 and bit TE in SCR3 to 0.
275

Advertisement

Table of Contents
loading

Table of Contents