Functional Description
Power on
When power is switched on, the HT6542B auto-
detect the motherboard type(AT or PS/2), then
disable the keyboard/mouse and waits for the
self-test command to perform a self-test. If no
error is detected during self-test, HE X 55 is
registered in the output buffer (note that any
value other than HE X 55 would indicate
HT6542B failure) and the keyboard interface is
enabled. The HT6542B is now ready to receive
a system command or keyboard data.
Keyboard/mouse data transmission
The keyboard/mouse transmits data to the con-
troller in an 11-bit format in sync, with the
keyboard/mouse clock signal. If this transmis-
sion is not completed within the specified pe-
riod, the HT6542B will register HE X FF into
the output buffer and set the "transmit time-
out" error bit in the STATUS RE GISTE R to 1.
Controller data transmission
The controller transmits data to the key-
board/mouse in the same manner as it receives
data from the keyboard/mouse. When the
HT6542B starts transmitting data and the key-
board/mouse does not start receiving (does not
start clocking) or data transmission is not com-
pleted within 15ms, the HT6542B will register
HE X FE into the output buffer and set the
"transmit time-out" error bit in the STATUS
RE GISTE R to 1.
Keyboard inhibited (KBD-INH to low)
If the K BD-INH is switched to low, the key-
board/mouse is inhibited. The HT6542B receive
keyboard/mouse code and check the KBD-INH
status, if inhibited the keyboard SCAN CODE
and mouse code will be ignored and the key-
board/mouse command response is registered
into the HT6542B’s output buffer.
Status register notations
The STATUS RE GISTE R is located in HE X 64
of the I/O. It provides the HT6542B and inter-
face status to the system. The following are the
definitions for each bit:
b0(OBF): Output buffer full
This bit is set while the HT6542B is sending
data to the output buffer and cleared when the
system reads the output buffer(I/O HEX 60H).
b1(IBF): Input buffer full
This bit is set while the system is sending
data to the HT6542B’s input buffer and
cleared when the HT6542B reads the input
buffer data.
b2: System flag
This bit is 0 after power-on reset, set to 1 after
self-test OK .
b3: Command/Data
When the system writes the data to the
HT6542B from I/O 64H, this bit becomes 1.
Reset to 0 if from I/O 60H.
b4:
This bit reflects the KBD-INH status when-
ever data is placed in the HT6542B’s output
buffer.
b5: Auxiliary Output Buffer Full.
0: The HT6542B’s output buffer is a keyboard
data.
1: The HT6542B’s output buffer is a mouse
data.
b6: Transmit time-out
Set to 1 when the keyboard or mouse is not
able to completely transmite data to the
HT6542B within the specified period.
b7: Parity error
1: T he HT 6542B has received the key-
board/mouse code with a parity error.
(should be odd parity).
Output buffer
The output buffer is located in I/O HE X 60. It is
used to transmit keyboard/mouse code or key-
board controller response data. The output buff-
er data is valid only when OBF=1.
Input buffer
The input buffer is located in I/O HE X 60 or
HE X 64. The system writes command and data
into this port in the following categories:
Data written to I/O HE X 64 as command
write.
Data written to I/O HE X 60 as data write.
HT6542B
5
30th Nov ’95