w681308 Winbond Electronics Corp America, w681308 Datasheet - Page 33

no-image

w681308

Manufacturer Part Number
w681308
Description
Usb Audio Controller
Manufacturer
Winbond Electronics Corp America
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
w681308DG
Manufacturer:
NUVOTON
Quantity:
5 000
Part Number:
w681308DG
Manufacturer:
NUVOTON
Quantity:
20 000
11.
The W6
Keypad scanner, GPIO, LCD/LCM and UART interfaces are co
11.1
The keypads consist of a number of b
Figur
soft
KX[0]
ware:
Keypad Scanner
Input/Output GPIO Ports
LCD/LCM i
UART
JTAG Interf
PCM I
SPI for Serial Data Flash
W2S Interface
1.
2.
3.
4.
5.
e
S1
S6
S11
S16
S21
4
81308 Int
Program KX[4:0] pin to output direction and output data 0. Program KY[4:0] pins to input direction.
While key is pressed, MCU will be informed by GPIO interrupt then to check KX[4:0] and KY[4:0] status.
KX[4:0] keep output data 0, then to read KY[4:0] status by register 0x1451[4:0], By reading
can know which bit equal 0, allowing it to determine which row is pressed.
Change pin KY[4:0] from input direction to output direction and output data 1. Change pin KX[4:0] from output
direction to input direction then to read KX[4:0] status by register 0x1450[4:0]. By reading KX[4:0] status, MCU can
know which bit equal 1, allowing it to determine which column is pressed.
MCU knows which row and column are pressed, so it can determine which key is pressed.
Interface Logic
Soft
The default pin KX[4:0] is
nte
interf
rface
ware Key
n
ace
ace
terface
erface log
KX[1]
Interface
pad Scan
S2
S7
S12
S17
S22
ic consists of:
ne
KX[2]
r
pull-L and
uttons, connec
Figure 4 Keypad Scanning Application Circuit
S3
S8
S13
S18
S23
pin KY[4:0] is pull-H, User can follow below steps to scan the keypad by
ted in a row/column arrangement as shown in
KX[3]
XXXX PRODUCT DESCRIPTION
S4
S9
S14
S19
S24
33
vered in this section.
KX[4]
S5
S10
S15
S20
S25
KY[0]
KY[1]
KY[2]
KY[3]
KY[4]
KY[4:0] status, MCU
W681308
Rev1.2

Related parts for w681308