
set_register(0x5A, ELE10_T, TOU_THRESH);
set_register(0x5A, ELE10_R, REL_THRESH);
set_register(0x5A, ELE11_T, TOU_THRESH);
set_register(0x5A, ELE11_R, REL_THRESH);
// Section D
// Set the Filter Configuration
// Set ESI2
set_register(0x5A, FIL_CFG, 0x04);
// Section E
// Electrode Configuration
// Set ELE_CFG to 0x00 to return to standby mode
set_register(0x5A, ELE_CFG, 0x0C); // Enables all 12 Electr
odes
// Section F
// Enable Auto Config and auto Reconfig
/*set_register(0x5A, ATO_CFG0, 0x0B);
set_register(0x5A, ATO_CFGU, 0xC9); // USL = (Vdd
0.7)/vdd*
256 = 0xC9 @3.3V set_register(0x5A, ATO_CFGL, 0x82); // LS
L = 0.65*USL = 0x82 @3.3V
set_register(0x5A, ATO_CFGT, 0xB5);*/
// Target = 0.9*USL
= 0xB5 @3.3V
set_register(0x5A, ELE_CFG, 0x0C);
}
It looks like a lot of code, but it simply repeating the procedure of setting the
threshold values for each electrode pin.
The last two functions in the example sketch simply check the status of the
irqpin
to determine if the IC is signaling that an electrode has been
touched. The very last function
set_register
simply runs the Arduino
through the standard steps in the Wire library to write the registers to the
IC.
Page 8 of 24