• Transmitting Serial Data: Follow the procedure below for transmitting serial data.
Figure 8-5. Sample Flowchart for Transmitting Serial Data
Start transmitting
Read TDRE bit in SSR
TDRE = “1”?
Write transmit data in TDR
End of
transmission?
End
1
2
3
No
Yes
No
Yes
SCI initialization: the transmit data output function of the TxD pin is
selected automatically.
(a)
(b)
To continue transmitting serial data: read the TDRE bit to check
whether it is safe to write; if TDRE = “1,” write data in TDR, then
clear TDRE to “0.”
To end serial transmission: end of transmission can be
confirmed by checking transition of the TEND bit from “0” to “1.”
This can be reported by a TEI interrupt.
To output a break signal at the end of serial transmission: set the
DDR bit to “1” and clear the DR bit to “0” (DDR and DR are I/O
port registers), then clear TE to “0” in SCR.
If using multiprocessor format,
select MPBT value in SSR
Clear TDRE bit to “0” in SSR
Read TEND bit in SSR
TEND = “1”?
No
Yes
Output break
signal?
No
Yes
Clear TE bit in SCR to “0”
4
SCI status check and transmit data write: read the serial status
register (SSR), check that the TDRE bit is “1,” then write transmit
data in the transmit data register (TDR) and clear TDRE to “0.”
If a multiprocessor format is selected, after writing the transmit
data write “0” or “1” in the multiprocessor bit transfer (MPBT) in
SSR. Transition of the TDRE bit from “0” to “1” can be reported
by an interrupt.
1.
3.
4.
2.
Initialize
Set DR = “0,” DDR = “1”
Serial transmission
188
Содержание H8/326 Series
Страница 67: ...58 ...
Страница 121: ...112 ...
Страница 274: ... 3 Clock Settling Timing Ø VCC RES STBY tOSC1 tOSC1 Figure 14 8 Clock Setting Timing 265 ...
Страница 279: ...270 ...