2015-10-21 11:26 AM
Attempting to port an existing 8 pad rotary touch sensor application which currently uses an external IC for touch sensing. Existing tsl_linrot.c from STMTouch library only supports to 6 channel rotary. Specifically I need to know how to compute TSL_tsignPosition_T for 8 channel rotary application. i.e TSL_POSOFF_8CH_ROT_M[8][8] =
#tsi-stmtouch2015-11-02 02:53 AM
Hi,
As you've certainly understood, the calculation and thus the table TSL_POSOFF_8CH_ROT_M[8][8] depend on the topology of the rotary you are working with.
Could you please detail the type of the rotary: standard mono or dual?
Best Regards,
Thierry,
2015-11-02 09:21 AM
Thierry,
8 Pads, Standard mono. The current touch pad IC is a Freescale MPR083 The current software only needs to the detect touch and release of each pad. I've attached a photo of the PCB pads Thanks for your help Darren Emmons OutBack Power Technologies2015-11-04 03:20 AM
Hi Darren,
Please find below the correponding table and declarations: 1. tsl_linrot.c file //============================================================================== // 8 CHANNELS - ROTARY - MONO // i.e. CH1 CH2 CH3 CH4 CH5 CH6 CH7 CH8 //============================================================================== #if TSLPRM_USE_8CH_ROT_M > 0 CONST TSL_tsignPosition_T TSL_POSOFF_8CH_ROT_M[8][8] = { // sec = 1 2 3 4 5 6 7 8 // j = 0 1 2 3 4 5 6 7 { 0, -24, 0, 0, 0, 0, 0, 120 }, // maj = 1; i = 0 { 8, 0, -40, 0, 0, 0, 0, 0 }, // maj = 2; i = 1 { 0, 24, 0, -56, 0, 0, 0, 0 }, // maj = 3; i = 2 { 0, 0, 40, 0, -72, 0, 0, 0 }, // maj = 4; i = 3 { 0, 0, 0, 56, 0, -88, 0, 0 }, // maj = 5; i = 4 { 0, 0, 0, 0, 72, 0, -104, 0 }, // maj = 6; i = 5 { 0, 0, 0, 0, 0, 88, 0, -120 }, // maj = 7; i = 6 {-136, 0, 0, 0, 0, 0, 104, 0 } // maj = 8; i = 7 }; #endif 2. tsl_linrot.h file #define TSL_SCTCOMP_6CH_ROT_M ((TSL_tNb_T)( 32)) Note that for optimum performances, all the channels must be acquired simultaneously. This implies that 8 analog I/O groups should be used. If not, this can introduce some side effects as the result of acquisition will be not extracted at once but in several phases. Between each phase, the touch can move slightly. This can thus introduce a wrong reporting of the touch position. Best Regards, Thierry,