MAX1233/MAX1234觸摸屏控制器入門
T R B2
0x8006 0x0000
T R DC
0x8042 0x0000
T R DD
0x800b 0x0000
T R GC
0x804f 0x0000
T R GD
0x800f 0x0000
T R GP
0x804e 0x0000
T R K1
0x8010 0x0000
T R K2
0x8011 0x0000
T R KB
0x8004 0x0000
T R KC
0x8041 0x0000
T R KK
0x8051 0x0000
T R KM
0x8050 0x0000
T R T1
0x8009 0x0000
T R T2
0x800a 0x0000
表21. 寫入寄存器助記符
DEMO1234 Command | Mnemonic | SPI data in |
T W AC hexValue | Test Write ADC_control register | 0x0040 hexValue |
T W DC hexValue | Test Write DAC_control register | 0x0042 hexValue |
T W DD hexValue | Test Write DAC_data register | 0x000b hexValue |
T W GC hexValue | Test Write GPIO_control register | 0x004f hexValue |
T W GD hexValue | Test Write GPIO_data register | 0x000f hexValue |
T W GP hexValue | Test Write GPIO_pullup register | 0x004e hexValue |
T W KC hexValue | Test Write KEY_control register | 0x0041 hexValue |
T W KK hexValue | Test Write KPCOLMASK register | 0x0051 hexValue |
T W KM hexValue | Test Write KPKEYMASK register | 0x0050 hexValue |
表22. 觸摸屏測量命令序列
DEMO1234 Command | Action (Triggered by A/D3210 Bits) | SPI data in Sequence |
T M1 | Measure X,Y | 0x0040 0x07010x8000 0x00000x8001 0x0000 |
T M2 | Measure X,Y,Z1,Z2 | 0x0040 0x0b010x8000 0x00000x8001 0x00000x8002 0x00000x8003 0x0000 |
T M3 | Measure X | 0x0040 0x0f010x8000 0x0000 |
T M4 | Measure Y | 0x0040 0x13010x8001 0x0000 |
T M5 | Measure Z1,Z2 | 0x0040 0x17010x8002 0x00000x8003 0x0000 |
T MD | No measurement; drive Y+,Y- | 0x0040 0x3701 |
T ME | No measurement; drive X+,X- | 0x0040 0x3b01 |
T MF | No measurement; drive Y+,X- | 0x0040 0x3f01 |
6.2) 中斷和狀態(tài)引腳命令
表23. 引腳狀態(tài)讀取命令DEMO1234 Command | Action | SPI data in |
P R 5 | Read KEYIRQ-bar pin status | N/A |
I C 0 3 | Enable KEYIRQ-bar falling-edge trigger pulse accumulator | N/A |
I C 0 1 | Enable KEYIRQ-bar rising-edge trigger pulse accumulator | N/A |
I C 0 0 | Disable KEYIRQ-bar pulse accumulator | N/A |
I R 0 | Read the number of times KEYIRQ-bar has pulsed low | N/A |
I 0 0 | Clear the KEYIRQ-bar pulse accumulator | N/A |
P R 6 | Read PENIRQ-bar pin status | N/A |
I C 1 3 | Enable PENIRQ-bar falling-edge trigger pulse accumulator | N/A |
I C 1 1 | Enable PENIRQ-bar rising-edge trigger pulse accumulator | N/A |
I C 1 0 | Disable PENIRQ-bar pulse accumulator | N/A |
I R 1 | Read the number of times PENIRQ-bar has pulsed low | N/A |
I 0 1 | Clear the PENIRQ-bar pulse accumulator | N/A |
P R 7 | Read BUSY-bar pin status | N/A |
6.3) 加入到更新后的MINIQUSB+固件中的命令
表24. 更新后MINIQUSB+固件01.05.40支持的SPI命令DEMO1234 Command | Action | CPOL | CPHA | CS-Bar Control | AF Length |
S C L0 | Configure SPI for CPOL=0 | 0 | — | GPIO-K9 | 1 byte |
S C L1 | Configure SPI for CPOL=1 | 1 | — | GPIO-K9 | 1 byte |
S C A0 | Configure SPI for CPHA=0 | — | 0 | GPIO-K9 | 1 byte |
S C A1 | Configure SPI for CPHA=1 | — | 1 | GPIO-K9 | 1 byte |
S C C0 | Configure SPI for 8-bit | — | — | GPIO-K9 | 1 byte |
S C C1 | Configure SPI for 8-bit auto-CS-bar | — | — | Automatic | 1 byte |
S C C2 | Configure SPI for 16-bit auto-CS-bar | — | — | Automatic | 2 bytes |
S C C3 | Configure SPI for 24-bit auto-CS-bar | — | — | Automatic | 3 bytes |
S C C4 | Configure SPI for 32-bit auto-CS-bar | — | — | Automatic | 4 bytes |
$ 2 AE 00 | Configure SPI for 8-bit | 0 | 0 | GPIO-K9 | 1 byte |
$ 2 AE 01 | Configure SPI for 8-bit | 0 | 1 | GPIO-K9 | 1 byte |
$ 2 AE 02 | Configure SPI for 8-bit | 1 | 0 | GPIO-K9 | 1 byte |
$ 2 AE 03 | Configure SPI for 8-bit | 1 | 1 | GPIO-K9 | 1 byte |
$ 2 AE 08 | Configure SPI for 8-bit auto-CS-bar | 0 | 0 | Automatic | 1 byte |
$ 2 AE 09 | Configure SPI for 8-bit auto-CS-bar | 0 | 1 | Automatic | 1 byte |
$ 2 AE 0A | Configure SPI for 8-bit auto-CS-bar | 1 | 0 | Automatic | 1 byte |
$ 2 AE 0B | Configure SPI for 8-bit auto-CS-bar | 1 | 1 | Automatic | 1 byte |
評論