摘要: 本用户手册解释了MAX1441接近和触摸传感器在运行时如何方便地与之通信。
MAX1441为双通道接近检测与触摸屏传感器,本文介绍了在产品开发过程中如何使用其接口固件,以简化MAX1441的性能评估。本文假设用户已熟悉MAX1441及其评估系统MAX1441EVSYS,了解MAX-IDE集成开发环境或类似工具,能够把应用固件下载到MAX1441EVSYS闪存。关于接近检测与触摸屏传感器的更多信息和详细规范,请参考 MAX1441 数据资料;关于MAX1441EVSYS的使用,以及如何利用MAX-IDE将程序下载到MAX1441闪存,请参考 MAX1441EVSYS 数据资料。
确认MAX1441评估板的JU105位于2-3。
将SPI接口程序Interface_Rxx装载到MAX1441闪存(使用MAX-IDE或类似工具)。
移除跳线JU120至JU124。
用电缆连接CAMXQUSB接口板和MAX1441评估板。
通过外部电源或USB为MAX1441评估板供电:
利用USB电缆连接CMAXQUSB+接口板和PC。
运行MAX1441_Console.exe程序。
表1. MAX1441_Console控制命令 | |||
Command | Description | Example | Return |
Init | System will search the USB ports with CMAXQUSB board connected | Init | CMD: init Found or Not Found message |
logfile on | Will create and opens a log file "MAX1441log.txt" (If file already exists, it will be cleared) | logfile on | CMD: logfile on |
logfile off | Will close the MAX1441log.txt file | logfile off | CMD: logfile off |
delay value | Will cause a delay ofvaluebetween each CS-cycle (valueis in seconds) | Delay 3 | CMD: delay 3 |
w address value | Writevalueto the register specified byaddress.Valueis always in hexadecimal format | w 3 22 | CMD: w 3 22 |
r address #ofData #ofCS-cycles | Read#ofDatatimes for each#ofCS-cyclesfrom register ataddress | r 0 2 3 | CMD: r 0 2 3 Time(s),CS,Data#,Data 0,1,1,0xXXXX 0,1,2,0xXXXX 0,1,3,0xXXXX 0,2,1,0xXXXX 0,2,2,0xXXXX 0,2,3,0xXXXX |
表2. 读/写命令的寄存器地址 | ||||
Address | Register Affected By Write Command | Register(s) Content Reported in Response to Read Command | Description | |
High Byte | Low Byte | |||
0 | — | CRSLT2H | CRSLT1H | Channel 2 and Channel 1 conversion results (4 LSBs and Overflow bits not reported) |
1 | — | CRSLT1H | CRSLT1L | Channel 1 conversion results |
2 | — | CRSLT2H | CRSLT2L | Channel 2 conversion results |
3 | CRNG | 0x00 | CRNG | Input capacitance range |
4 | FEL | 0x00 | FEL | Excitation Frequency |
5 | FEB | 0x00 | FEB | Bandwidth of the spread spectrum modulation |
6 | DSB | 0x00 | DSB | Standby conversion rate |
7 | SSB2 | 0x00 | SSB2 | Channel 2 standby conversion rate subdivider |
8 | CO1 | 0x00 | CO1 | Channel 1 capacitance offset |
9 | CO2 | 0x00 | CO2 | Channel 2 capacitance offset |
10 | AT1H | 0x00 | AT1H | Channel 1 absolute threshold |
11 | AT2H | 0x00 | AT2H | Channel 2 absolute threshold |
12 | RT1H | 0x00 | RT1H | Channel 1 rate of change threshold |
13 | RT2H | 0x00 | RT2H | Channel 2 rate of change threshold |
14 | PD | 0x00 | PD | Power-Down Register |
15 | SCT | 0x00 | SCT | Single Conversion Register |
16 | AFEINRST | 0x00 | AFEINRST | AFE Interrupt Status Register |
17 | WU1 | 0x00 | WU1 | Channel 1 Wake-Up Control Register |
18 | WU2 | 0x00 | WU2 | Channel 2 Wake-Up Control Register |
?? (Note 1) (Note 2) | — | 0x?? | 0x?? | Unrecognized address; address will be returned by the MAX1441 |
“??”表示任何非法地址,合法地址可以是十进制(DEC)或十六进制格式(HEX)。
对任何非法地址(例如“ab”),命令将返回前次数值。0xab是非法地址,返回值为0xABAB。
社群二维码
关注“华强商城“微信公众号
Copyright 2010-2023 hqbuy.com,Inc.All right reserved. 服务热线:400-830-6691 粤ICP备05106676号 经营许可证:粤B2-20210308