Service manual
Service Manual
the LED status. After the reset sequence, key scanning
will only be enabled if a scan enable acknowledged (
SACK or SMAK) was received from the ARM.
Data transmission
When enabled for scanning, the keyboard controller
informs the ARM of any new key down or new key up by
sending a two byte code incorporating the key row and
column addresses. The first byte gives the row and is
acknowledged by a byte acknowledge (BACK) code from
the ARM. If BACK was not the acknowledge code then
the error process (ON error) is entered. If the BACK
code was received, the keyboard controller sends the
column information and waits for an acknowledge. If
either a NACK, SACK, MACK or SMAK acknowledge
code is received, the keyboard controller continues by
processing the ACK type and selecting the mouse and
scan modes implied. If the character received as the
second byte acknowledge was not one of
NACK/MACK/SACK/SMAK then the error process is
entered.
Mouse data
Mouse data is sent by the keyboard controller if
requested by a RQMP request from the ARM or if a
SMAK or MACK has enabled transmission of non-zero
values. Two bytes are used for mouse position data.
Byte one encodes the accumulated movement along the
X axis while byte two gives Y axis movement.
Both X and Y counts must be transferred to temporary
registers when data transmission is triggered, so that
accumulation of further mouse movement can occur. The
Code values
X and Y counters are cleared upon each transfer to the
transmit holding registers. Therefore, the count values are
relative to the last values sent. The ARM acknowledges
the first byte (Xcount) with a BACK code and the second
byte (Ycount) with any of NACK/MACK/SACK/SMAK. A
protocol failure causes the keyboard controller to enter
the error process (ON error).
When transmission of non-zero mouse data is enabled,
the keyboard controller gives key data transmission
priority over mouse data except when the mouse counter
over/underflows.
Acknowledge codes
There are seven acknowledge codes which may be sent
by the ARM. RAK1 and RAK2 are used during the reset
sequence. BACK is the acknowledge to the first byte of a
2-byte keyboard data set. The four remaining types,
NACK/MACK/SACK and SMAK, acknowledge the final
byte of a data set. NACK disables key scanning and
therefore key up/down data transmission as well as
setting the mouse mode to send data only on RQMP
request. SACK enables key scanning and key data
transmission but disables unsolicited mouse data. MACK
disables key scanning and key data transmission and
enables the transmission of mouse count values if either
X or Y counts are non-zero. SMAK enables key scanning
and both key and mouse data transmission. It combines
the enable function of SACK and MACK.
While key scanning is suspended (after NACK or MACK)
any new key depression is ignored and will not result in a
key down transmission unless the key remains down after
scanning resumes following a SACK or SMAK.
Mnemonic
msb
Isb
Comments
HRST
1111
1111
1-byte command, keyboard reset.
RAK1
1111
1110
1-byte response in reset protocol.
RAK2
1111
1101
1-byte response in reset protocol.
RQPD
0100
xxxx
1-byte from ARM, encodes four bits of data.
PDAT
1110
xxxx
1-byte from keyboard, echoes four data bits of RQPD.
RQID
0010
0000
1-byte ARM request for keyboard ID.
KBID
10xx
xxxx
1-byte from keyboard encoding keyboard ID.
KDDA
1100
xxxx
New key down data. Encoded Row (first byte) and column (second byte) numbers.
KUDA
1101
xxxx
Encoded Row (first byte) and column (second byte) numbers for a new key up.
RQMP
0010
0010
1-byte ARM request for mouse data.
MDAT
Oxxx
xxxx
Encoded mouse count, X (byte1) then Y (byte2). Only from ARM to keyboard.
BACK
0011
1111
Ack for first keyboard data byte pair.
NACK
0011
0000
Last data byte Ack, selects scan/mouse mode.
SACK
0011
0001
Last data byte Ack.
MACK
0011
0010
Last data byte Ack.
SMAK
0011
0011
Last data byte Ack.
LEDS
0000
0xxx
bit flag to turn LED(s) on/off.
PRST
0010
0001
From ARM, 1-byte command, does nothing.
x is a data bit in the Code; e.g. xxxx is a four bit data field
Part 1 - System description Issue 2, June 1991 1-11