AnsweredAssumed Answered

Kwikstik touch sensors

Question asked by derick petrey on Mar 31, 2012
Latest reply on Apr 6, 2012 by Mark Butcher

Hello, I was wondering if someone could help me out a little bit with reading the touch sensors on the kwikstik.


So far what ive done is set:



TSIO_PEN = 0xffff       just to ensure i turn on the right touch pad cause its hard to understand which TSI pin is = E3,E4,E5,E6 on kwikstik although i do know that E3 = PTA24, E4 = PTA25, E5 = PTA26, E6 = PTA27


I assume im gonna have to monitor GPIOA_PDIR for PTA24,25,26,27 when i touch E3,4,5,6 but again im not super sure


Can anyone help me understand better how to monitor the sensor pad so i can make an event happen when pad is touched?




Here is how im writing the values, and they do go into the address locations correctly:


VAL1:         .word 0x140
VAL2:         .word 0x403A0  //turn on portA and TSI clocks
VAL3:         .word 0x20000
VAL4:         .word 0x1
VAL5:         .word 0xfffff
VAL6:         .byte 0x06
VAL7:         .word 0x80
VAL8:         .word 0xffff
VAL9:         .word 0x35


LDR R1,SIM_SCG5     // turn on clock for PORTA and TSI
      LDR R2,VAL2
      STR R2,[R1]
      LDR R1,TSIO_GENCS     
      LDR R2,VAL7
      STR R2,[R1]
      LDR R1,TSIO_PEN     
      LDR R2,VAL8
      STR R2,[R1]

     This is to turn on PORTA_17 for use toggling LED


      LDR R1,PORTA_PCR17  // set MUX bit to a "1" to set PORTA_17 as GPIO ALT 1 and set DSE bit to a "1" for high drive strength  
      LDR R2,VAL1
      STR R2,[R1]