English
Language : 

PC87363 Datasheet, PDF (98/200 Pages) National Semiconductor (TI) – 128-Pin LPC SuperI/O with MIDI and Game Ports, Extended Wake-Up and Protection
3.0 System Wake-Up Control (SWC) (Continued)
3.4.17 PS/2 Keyboard and Mouse Wake-Up Events
The SWC can be configured to detect any predetermined PS/2 keyboard or mouse activity.
The detection mechanisms for keyboard and mouse events are independent. Therefore, they can be operated simulta-
neously with no interference. Since both mechanisms are implemented by hardware which is independent of the device’s
keyboard controller, the keyboard controller itself need not be activated to detect either keyboard or mouse events.
Keyboard Wake-Up Events
The keyboard wake-up detection mechanism can be programmed to detect:
q Any keystroke
q A specific programmable sequence of up to eight alphanumeric keystrokes (Password mode)
q Any programmable sequence of up to 8 bytes of data received from the keyboard (Special Key Sequence mode).
To program the keyboard wake-up detection mechanism to wake-up on any keystroke, perform the following sequence:
1. Put the wake-up mechansim in Special Key Sequence mode by setting bits 3-0 of the PS2CTL register to 0001b.
2. Set the PS2KEY0 and PS2KEY1 registers to 00h. This forces the wake-up detection mechanism to ignore the values of
incoming data, thus causing it to wake-up on any keystroke.
In Password mode, the Make and Break bytes transmitted by the keyboard are discarded, and only the scan codes are com-
pared against those programmed in the PS2KEYn registers. To simplify the detection mechanism, only keys with a scan
code of 1 byte can be included in the sequence to be detected. To program the keyboard wake-up detection mechanism to
operate in Password mode, proceed as follows:
1. Set bits 3-0 of the PS2CTL register with a value that indicates the desired number of keystrokes in the sequence. The
programmed value should be the number of keystrokes + 7. For example, to wake-up on a sequence of two keys, set
bits 3-0 to 9h.
2. Program the appropriate subset of the PS2KEY0-PS2KEY7 registers, in sequential order, with the scan codes of the
keys in the sequence. For example, if there are three keys in the sequence and the scan codes of these keys are 05h
(first), 50h (second) and 44h (third), program PS2KEY0 to 05h, PS2KEY1 to 50h and PS2KEY2 to 44h (the scan codes
are only examples).
In Special Key Sequence mode, all the bytes transmitted by the keyboard are compared against the ones programmed in
the PS2KEYn registers. These include also the Make and Break bytes. This mode enables the detection of any sequence
of keystrokes, including also keys such as Shift and Alt. To program the keyboard wake-up detection mechanism to operate
in Special Key Sequence mode, proceed as follows:
1. Set bits 3-0 of the PS2CTL register to a value that indicates the desired number of keystrokes in the sequence. The pro-
grammed value should be the number of keystrokes + 1. For example, to wake-up on a sequence of three received bytes,
set bits 3-0 of PS2CTL to 2h.
2. Program the appropriate subset of the PS2KEY0-PS2KEY7 registers, in sequential order, with the values of the data
bytes that comprise the sequence. For example, if the number of bytes in the sequence is four, and the values of these
bytes are E0h (first), 5Bh (second), E0h (third) and DBh (fourth), program PS2KEY0 to E0h, PS2KEY1 to 5Bh, PS2KEY2
to E0h and PS2KEY3 to DBh (the byte values are only examples).
Mouse Wake-Up Events
The mouse wake-up detection mechanism can be programmed to detect either any mouse click or movement, or a specific
programmable click (left or right) or double-click.
To program this mechanism to wake-up on a specific event, set bits 6-4 of the PS2CTL register to the required value, ac-
cording to the description of these bits in Section 3.4.18.
98
www.national.com