English
Language : 

W681307 Datasheet, PDF (49/160 Pages) Winbond – USB1.1 CODEC Microprocessor Control Unit with 32KB Mask ROM and 4KB RAM
W681307
9. INTERFACE LOGIC
: The Interface logic consists of
• A Keypad Scanner
• Timers
• Input/Output Ports
: Figure 9-1 illustrates the operation of the Interface Logic
unstable_ck13m
32000Hz
/ 256 125Hz
KeyCIx[5:0]
Keypad
Scanner
State
Machine
IntWriteData[7..0]
IOReadData
IOReadValid
IntAddress [9..0]
KeyIntrpt
TimerIntrpt
DogTimeout
KeyROx[5:0]
KeyRIx[5:0]
KeyCIx[4:0]
IO Register
KeyRO [6..0]
KeyRD [6..0]
KeyCO [6..0]
KeyCD [6..0]
32KHz
/ 32 1ms
Timer
/1000 100Hz
Figure 9-1 The Interface Logic.
9.1
Keypad Scanner
9.1.1
Overview
The Keypad Scanner State Machine operates from the 32000Hz clock. The keypad scanner identifies which key has been pressed and
includes de-bouncing logic. Multiple concurrent key presses are not supported. Dividers provide 1Hz and 1ms timing signals. The 1 Hz
signal provides timing for keypad de-bouncing and the 1 Hz and 1ms signals are used for the Timer.
The KeySize register sets the size of the keypad, up to 9 of the unused signals can be used as IO Ports.
All active Row outputs are initially set high, each Column input has an external pull-down resistor. When a Key is pressed, the signal
from one Column will go high. The Keypad Scanner function operates as follows:
• The State machine waits in a default state until a high is found at one of the Column inputs.
• Each active Row output is set low in turn until a low is detected at the Column input. The Row and Column numbers are stored.
• The State Machine waits for the de-bounce period set in the KeyBounce Register.
• Each Row output is set low in turn until a low is detected at the Column input. The Row and Column numbers are stored.
• The Row and Column numbers stored at 2 and 4 are compared. If these are the same, a valid keystroke has been detected.
• The State Machine waits for unstable_ck13m to go low, asserts KeyIntrpt and returns to 1.
The KeyBounce register sets a de-bounce period of 8mS, 16mS, 24mS or 32mS (times are -0.0 mS +1.5 mS).
- 49 -
Publication Release Date: May, 2007
Revision 1.3