English
Language : 

MEC1322 Datasheet, PDF (353/456 Pages) Microchip Technology – Keyboard and Embedded Controller for Notebook PC
30.10 Description
FIGURE 30-2:
Keyboard Scan Interface Block Diagram
MEC1322
48MHz
EC Bus
KSC_INT_WAKE
KSC_INT
VCC1_RESET
SPB
I/F
KSO
Select
Register
Output
Decoder
KSI
Interrupt
Interface
KSI Input
and
Status
Registers
KSO[17:0]
KSI[7:0]
During scanning the firmware sequentially drives low one of the rows (KSO[17:0]) and then reads the column data line
(KSI[7:0]). A key press is detected as a zero in the corresponding position in the matrix. Keys that are pressed are
debounced by firmware. Once confirmed, the corresponding keycode is loaded into host data read buffer in the 8042
Host Interface module. Firmware may need to buffer keycodes in memory in case this interface is stalled or the host
requests a Resend.
30.10.1 INITIALIZATION OF KSO PINS
If the Keyboard Scan Interface is not configured for PREDRIVE Mode, KSO pins should be configured as open-drain
outputs. Internal or external pull-ups should be used so that the GPIO functions that share the pins do not have a floating
input when the KSO pins are tri-stated.
If the Keyboard Scan Interface is configured for PREDRIVE Mode, KSO pins must be configured as push-pull outputs.
Internal or external pull-ups should be used to protect the GPIO inputs associated with the KSO pins from floating inputs.
30.10.2 PREDRIVE MODE
There is an optional Predrive Mode that can be enabled to actively drive the KSO pins high before switching to open-
drain operation. The PREDRIVE ENABLE bit in the Keyscan Extended Control Register is used to enable the PRE-
DRIVE option. Timing for the Predive mode is shown in Section 38.9, Keyboard Scan Matrix Timing.
30.10.2.1 Predrive Mode Programming
The following precautions should be taken to prevent output pad damage during Predrive Mode Programming.
 2014 - 2015 Microchip Technology Inc.
DS00001719D-page 353