English
Language : 

MEC1404 Datasheet, PDF (411/572 Pages) Microchip Technology – Keyboard and Embedded Controller Products for Notebook PC
30.10 Description
48MHz
EC Bus
KSC_INT_WAKE
KSC_INT
SPB
I/F
MEC140X/1X
KSO
Select
Register
Output
Decoder
KSI
Interrupt
Interface
KSI Input
and
Status
Registers
KSI[7:0]
FIGURE 30-2:
Keyboard Matrix Scan Interface Block Diagram
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 43.16, 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.
30.10.2.2 Asserting PREDRIVE_ENABLE
1. Disable Key Scan Interface (KSEN = '1')
2. Enable Predrive function (PREDRIVE_ENABLE = '1')
3. Program buffer type for all KSO pins to "push-pull”
 2015 - 2016 Microchip Technology Inc.
DS00001956D-page 411