初始化程序如下:
TSM_Write_Byte(CTRL2, 0x0f);
TSM_Write_Byte(SENS1, CH_SENS(3,3));// 9, 6
TSM_Write_Byte(SENS2, CH_SENS(3,3));// 3, #
TSM_Write_Byte(SENS3, CH_SENS(3,3));// 8, 5
TSM_Write_Byte(SENS4, CH_SENS(3,3));// 2, 0
TSM_Write_Byte(SENS5, CH_SENS(3,3));// *, 1
TSM_Write_Byte(SENS6, CH_SENS(3,3));// 4, 7
/* General Control Register1 setting */
TSM_Write_Byte(CTRL1, 0x33);
TSM_Write_2Byte(REF_RST1, 0x00, 0x00);//renew value of everyone channel
TSM_Write_2Byte(CH_HOLD1, 0x00, 0x00);//enable all channels
TSM_Write_Byte(CTRL2, 0x03);
TSM_EN_H;//TSM12 I2C disable
电路是完全参照手册的防干扰电路,就是触摸按键时芯片时有时坏的,有用过的前辈大神还望不吝赐教。 |