
Contents
IQS316 Design Guide .................................................................................................................................................. 1
1Memory Map ..................................................................................................................................................... 4
1.1 General Memory Map Structure ....................................................................................................................... 4
1.2 IQS316 Memory Map ........................................................................................................................................ 5
1.2.1 Device Information ....................................................................................................................................... 5
1.2.2 Device Specific Data...................................................................................................................................... 6
1.2.3 Proximity Status Bytes .................................................................................................................................. 6
1.2.4 Touch Status Bytes........................................................................................................................................ 6
1.2.5 Halt Bytes...................................................................................................................................................... 7
1.2.6 Active Bytes................................................................................................................................................... 7
1.2.7 Current Samples............................................................................................................................................ 7
1.2.8 Long-Term Averages and Thresholds............................................................................................................ 9
1.2.9 Device Settings............................................................................................................................................ 11
1.3 Memory Map Description................................................................................................................................ 18
1.3.1 Device Information ..................................................................................................................................... 18
1.3.2 Device Specific Data.................................................................................................................................... 18
1.3.3 Proximity Status Bytes ................................................................................................................................ 19
1.3.4 Touch Status Bytes...................................................................................................................................... 19
1.3.5 Halt Bytes.................................................................................................................................................... 19
1.3.6 Active Bytes................................................................................................................................................. 19
1.3.7 Current Samples.......................................................................................................................................... 19
1.3.8 Long-Term Averages & Touch/Prox Thresholds ......................................................................................... 20
1.3.9 Device Settings............................................................................................................................................ 21
2General Implementation hints ..........................................................................................................................29
2.1 Communication window.................................................................................................................................. 29
2.1.1 SPI Communication window ....................................................................................................................... 29
2.1.2 I2C Communication window........................................................................................................................ 29
2.2 Startup Procedure ........................................................................................................................................... 29
2.2.1 Individual Prox and Touch Thresholds ........................................................................................................ 30
2.2.2 Auto ATI Procedure..................................................................................................................................... 30
2.2.3 Post Setup ................................................................................................................................................... 30
2.3 General I2C Hints ............................................................................................................................................. 31
2.3.1 I2C Pull-up resistors ..................................................................................................................................... 31
2.3.2 MCLR........................................................................................................................................................... 31
2.3.3 Reset Device while using I2C ....................................................................................................................... 31
3Sample implementation....................................................................................................................................31
3.1 Overview.......................................................................................................................................................... 31
3.1.1 Communications: ........................................................................................................................................ 31
3.2 Functions ......................................................................................................................................................... 33
3.2.1 IQS316_Settings.......................................................................................................................................... 33
3.2.2 IQS316_Refresh_Data................................................................................................................................. 38
3.2.3 IQS316_Process_Data ................................................................................................................................. 39
3.2.4 Main Function (I2C and SPI) ........................................................................................................................ 40
3.2.5 Comms_init................................................................................................................................................. 41
3.2.6 IQS316_Read............................................................................................................................................... 41
3.2.7 IQS316_ReadCurrentAddress ..................................................................................................................... 43