MAX1233/MAX1234触摸屏控制器入门

[09-13 17:05:19]   来源:http://www.88dzw.com  控制技术   阅读:8648

文章摘要:4.4) 从键盘中屏蔽单个按键使用键盘屏蔽寄存器和键盘2结果寄存器来屏蔽每个按键。屏蔽掉的按键被扫描至KPD寄存器,但是不在键盘2结果寄存器中报告。表17. 按键命令序列:屏蔽单个按键 DEMO1234 CommandActionSPI data inVerificationT W GC 0000Keypad:(C4,C3,C2,C1) x (R4,R3,R2,R1);GPIO outputs: none;GPIO inputs: none0x004f 0x0000T W KC bf00Wait for keypress;maximum debounce and hold times0x004

MAX1233/MAX1234触摸屏控制器入门,标签:计算机控制技术,工厂电气控制技术,http://www.88dzw.com

4.4) 从键盘中屏蔽单个按键

使用键盘屏蔽寄存器和键盘2结果寄存器来屏蔽每个按键。屏蔽掉的按键被扫描至KPD寄存器,但是不在键盘2结果寄存器中报告。

表17. 按键命令序列:屏蔽单个按键
DEMO1234 Command
Action
SPI data in
Verification
T W GC 0000
Keypad:
(C4,C3,C2,C1) x (R4,R3,R2,R1);
GPIO outputs: none;
GPIO inputs: none
0x004f 0x0000
T W KC bf00
Wait for keypress;
maximum debounce and hold times
0x0041 0xbf00
T W KM 0020
Mask only R2C2 key
0x0050 0x0020
Press and release R1C1 (key "1")
T R KB
Read raw keypad result
0x8004 0x0000
0x0001 = R1C1 key
T R K2
Read masked keypad result
0x8011 0x0000
0x0001 = R1C1 key
Press and release R2C2 (key "5")
T R KB
Read raw keypad result
0x8004 0x0000
0x0020 = R2C2 key
T R K2
Read masked keypad result
0x8011 0x0000
0x0000 = no key
Press and release R3C2 (key "8")
T R KB
Read raw keypad result
0x8004 0x0000
0x0040 = R3C2 key
T R K2
Read masked keypad result
0x8011 0x0000
0x0040 = R3C2 key

4.5) 从键盘中屏蔽一列

使用键盘列寄存器来屏蔽所有列。不扫描屏蔽列,因此,KPD寄存器不会探测这些列中的按键。

表18. 按键命令序列:屏蔽键盘的一列
DEMO1234 Command
Action
SPI data in
Verification
T W GC 0000
Keypad:
(C4,C3,C2,C1) x (R4,R3,R2,R1);
GPIO outputs: none;
GPIO inputs: none
0x004f 0x0000
T W KC bf00
Wait for keypress;
maximum debounce and hold times
0x0041 0xbf00
T W KK 2000
Mask entire C2 column
0x0051 0x2000
Press and release R1C1 (key "1")
T R KB
Read raw keypad result
0x8004 0x0000
0x0001 = R1C1 key
Press and release R2C2 (key "5")
T R KB
Read raw keypad result
0x8004 0x0000
(previous value)
Press and release R3C2 (key "8")
T R KB
Read raw keypad result
0x8004 0x0000
(previous value)
Press and release R2C3 (key "6")
T R KB
Read raw keypad result
0x8004 0x0000
0x0200 = R2C3 key

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]  下一页


Tag:控制技术计算机控制技术,工厂电气控制技术控制技术