Transmit Operation - Renesas H8S/2100 Series Hardware Manual

6-bit single-chip microcomputer
Hide thumbs Also See for H8S/2100 Series:
Table of Contents

Advertisement

19.4.2

Transmit Operation

In a transmit operation, KCLK (clock) is an output on the keyboard side, and KD (data) is an
output on the chip (system) side. KD outputs a start bit, 8 data bits (LSB-first), an odd parity bit,
and a stop bit, in that order. The KD value is valid when KCLK is high. A sample transmit
processing flowchart is shown in figure 19.5, and the transmit timing in figure 19.6.
Start
Set KBIOE bit
Clear KBE bit
(reception disabled)
Write transmit data
to KBTR
Read KBCRH
Both KCLKI and
KDI = 1?
Yes
Set I/O inhibit
(KCLKO = 0)
Read KBCRH
KDI = 1?
Yes
Set start bit
(KDO = 0)*
Set KBTS
(KBTS = 1)
Clear I/O inhibit
(KCLKO = 1)
Autmatic transmission
KBTE = 1
Yes
KTER = 0
Yes
Clear KBTE bit
To transmit operation or receive operation
(Condition: KBE = 0)
[1]
[2]
[3]
[4]
No
Receive termination
processing execution
KDO retains 1
[5]
No
Retransmit request
processing execution
KCLKO retains 0
[6]
[7]
KDO retains 0
[8]
[9]
No
[10]
Error handling
No
[11]
Figure 19.5 Sample Transmit Processing Flowchart
Section 19 Keyboard Buffer Control Unit (PS2)
[1]
Write 1 to the KBIOE bit to enable transmission/
reception.
[2]
Clear the KBE bit (reception disabled).
[3]
Write transmit data to KBTR.
[4]
Read KBCRH, and when both the KCLKI and
KDI bits are 1, write 0 to the KCLKO bit to set
the I/O inhibit. 60 µs or more is required for I/O
inhibit.
[5]
Read KBCRH, and when the KDI bit is 1, write
0 to the KDO (set start bit).
[6]
Write 1 to the KBTS bit to enter the transmit
enabled state.
[7]
Write 1 to the KCLKO bit to clear the I/O inhibit.
[8]
Check D0 to D7, the parity bit, the stop bit, and
receive completion notification (send data at the
falling edge of the KCLK signal).
[9]
The KBTE bit is set to 1 at the eleventh rising
edge of the KCLK signal. When KTIE = 1, a
CPU interrupt occurs.
[10]
When KTER = 0, transmission is successfully completed.
[11]
Clear the KBTE bit to 0.
Note: * The start bit (KDO = 0) is automatically initialized (KDO = 1)
when automatic transmission is started. After initialization,
to write 0 to KDO, read 1 before writing 0 to it.
Rev. 1.00 May 09, 2008 Page 567 of 954
REJ09B0462-0100

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8s/2112r

Table of Contents