Capsense design with dual sliders | Cypress Semiconductor
Capsense design with dual sliders
I have a design using 2 touch sense sliders (1 with 13 elements, the second with 5). They're sued together to form a touchpad matrix.
This is a rework fo an earlier design on which I used the system level design (so it shoudl work), but as this is no longer recommended, I have swapped over to using the chip level.
My problem is the larger slider only seems to be using 3/4's of its sensors, and the second slider isn't working at all. I thought the paramenter might have fixed it, but I don't seem to be able to get any change in performance. I have inspected the board about a dozen times looking for open or short circuits and foudn nothing, which has left me looking at my code.
Is there something wrong with what I have done? Or is there something else I may have overlooked?
int pos_x, pos_y;
// Insert your main routine code here.
while(1) //loop forever
//if the colour palette is active
if((pos_x != 0xFFFF) || (pos_y != 0xFFFF))
//transmit the position via I2C
out_data = pos_x;
out_data = pos_y;
I2C_OUT_bWriteBytes(1, out_data, 2, I2C_OUT_CompleteXfer);