This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TIC12400-Q1: TIC12400-Q1 Switch status read issue

Part Number: TIC12400-Q1

Hai Team,

We interfaced MSDI with microcontroller. The SPI Communication between switch and MCU is working. we are connected channel 0,2,4,6 as Ground connected. we are able to read the MSDI Device ID Register as well.

it returns as 0x20.

But we are unable to detect the Switch Change by reading the Status register(0x05) while pressing the switch. But it changes in the Hardware.

we wrote the attached configurations. Once the configuration is completed the voltage on the signal is  increased to 4.5V( Why it is increasing). Actually it is 2.4V Without pressing the switch.

Please find the below configuration. Can you help me is there any configuration issue. The voltage before configuration is 2.4V with out pressing the switch and 1.3V with pressing the switch. we programmed 2V as comparator Threshold.



Step1:Enable input channels 0 2 4 6 (Requirement)
Register 1BH

23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
 0  0  0  0  0  0  0  0  0  0  0  0  0  0 0 0 0 1 0 1 0 1 0 1 ---->0x000055




Setp2: Current Source Selection:

Register 1CH

Configure all to source selection [0h]


23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0  ----> 0x000000
 0  0  0  0 0  0   0  0  0  0  0  0  0  0 0 0 0 0 0 0 0 0 0 0




Step3: Wetting Current Configuration

WC_CFG0 Register 1Dh : wetting current Configure to 2mA[2h]


23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ---> 0x002092
0  0  0  0  0  0  0  0   0  0  1  0  0  0 0 0 1 0 0 1 0 0 1 0 


WC_CFG1 Register 1EH : Wetting current configure to 2mA[2H]



23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ---> 0X000000
0  0  0  0  0   0  0  0 0  0  1  0  0  0  0 0 1 0 0 1 0 0 1 0 




Step4: Mode Selection

Mode Register 32h


23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ---> 0x000000
0  0  0  0   0  0  0  0  0  0  0  0  0  0 0 0 0 0 0 0 0 0 0 0


Step 5: Set Device Configuration

Register Address 1AH
Set trigger to 0 [Stop Device]
VS Ratio to 1 - to support voltage range from 4.5 to 30v
polling enabled
INT_CONFIG - Interrupt Assertion to static
crc disabled
Polling activation time 1024us[bh]
polling time 4ms [1h]



23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ---> 0x953562
1  0  0  1  0  1  0  1  0  0  1  1  0  1  0 1 0 1 1 0 0 0 1 0




Step 6 : Comparator Thresholds Configuration

THRES_COMP Register 21h:
Set to 3h - threshold voltage to 2V

Digital Inputs 00 02 04 06

23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ---> 0x000000
0  0  0  0   0  0  0  0  0  0  0  0  0  0 0 0 0 0 0 0 0 0 0 0 


Step 7 :Enable global interrupt on state change

INT_EN_CFG0 Register 24h: Global Interput
SSC_EN TO enable interrupt assertion on Switch State Change 


23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ---> 0x000004
0  0  0  0  0  0  0  0  0  0  0  0   0  0 0 0 0 0 0 0 0 1 0 0 


Step 8: Interrupts detection configuration
Register is 0x22

Digital Input 00,02,04,06

23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ---> 0x003333
0  0  0  0  0  0  0  0  0  0  1   1  0 0  1 1 0 0 1 1 0 0 1 1 



Step 9 : Enable Device to Start Operation:

Now all the required settings done, enable trigger for normal operation

CONFIG Register 1Ah:

23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ---> 0x812D62(Requirement)


Step 9 : Monitor status
IN_STAT_COMP

IN_STAT_COMP Register 05h:

Read the contetns of STAT_COMP Register to verify the changes but it is not changing with pressing the switch.


 






































  • Hi Samudra,

    Thanks for the detailed register configuration information!  I see you are using Polling Mode which will enable and disable the wetting current during the polling cycle.  This will charge and discharge the capacitance on the INx pins and can create some DC offsets that we need to verify.

    Can you tell me what the external components connected to the INx pins are?  A simple schematic or drawing of the switch, resistors and capacitors along with the values would suffice.  Also, what is the resistance across the switch in the open and closed position?

    How are you measuring the voltage on the INx pins?  Are you using a digital multi-meter, or a scope?  Can you use a scope if you are not doing so and share the scope plots?

    What are the VS and VIO voltages you are using? 

    Regards,

    Jonathan

  • Hi sir,

    Thanks for the response. Can you please check the attached pdf for your questions.

    Input to TI on TIC12400-1.pdf

  • Hi Samudra,

    Thank you for the additional information.  Your scope plots do appear to show the input voltage crossing the 2V threshold range, but I am curious why you are using such large resistor values (47k) to form a voltage divider, and also why you have a 100 ohm pull-up resistor to 5V on each Input pin? 

    The TIC12400-Q1 is trying to source 2mA of wetting current out of the INx pin through a switch to GND.  If the switch is Closed, there will be a low-impedance path to GND and the INx pin will have a low voltage.  However if the switch is open, it will have a high-impedance path to GND and the INx pin will see a higher voltage typically close to the VS supply voltage. 

    The current across a single 47k series resistor with a 12V supply would be only approximately 250uA because the 47k resistor will prevent the full 2mA of wetting current to flow.  Therefore, your input voltage is based on a complex voltage divider mix of current coming from the 5V and the 12V supplies.

    Are these components required, or can you try to adjust their values?  I would recommend removing the 100 ohm 5V pull-up resistor and also the 47k pull-down resistor.  I would also recommend making the 47k series resistor to something like 100 ohms.  A common application would have a single series resistor and a filter capacitor between the INx pin and the switch.

    I will try to replicate your configuration using an EVM to see if I get similar results and also identify any incorrect configuration register settings.

    Regards,

    Jonathan

  • Hai sir,

    Sure sir. Thank you so much for recommend values. we will change and test it here. Meanwhile can you please verify Register settings 

    in your setup.

    Kind regards,

    Samudralankaiah.

  • Hi Samudralankaiah,

    I directly copy and pasted the register values you provided into an EVM following the sequence you provided and I see Inputs transitioning around the 2V comparator threshold.  Here is a screenshot of the moment I switched all 4 switches.

    The SSC bit of the IN_STAT register (0x02) and bits 0, 2, 4, and 6 of the IN_STAT_COMP register (0x05) also have been set to reflect the state change on the 4 switches. 

    Opening the switches causes the Input States to switch back to high.

    It appears your register configuration is correct.  Please let me know if you have any changes to your results after making some adjustments to the resistors on the INx pins.

    Are you using a custom board or a TC12400-Q1 EVM?  (Link)

    Regards,

    Jonathan

  • Hi sir,

    Thank you so much. After changing the resistors according to your suggestions it is working. The status register values are changing according to Digital Switch Status. if we press the switch interrupt also generated. Interrupt Signal is low. But It is not coming high state After releasing the switch. is it required any register configuration?

    Kind regards,

    Samudra

  • Hi Samudra,

    The Interrupt bits are cleared by reading the INT_STAT register.  Are you reading this register?

    If you are just monitoring the INT pin voltage, it will transition low when any of the enabled interrupt bits are set and remain low until the INT_STAT register has been read.  After the INT_STAT has been read the INT pin will transition high again.

    Regards,

    Jonathan

  • Hi sir,

    Thank you so much sir. I will try this Tomorrow. And let you know about it. 

    Kind regards,

    Samudra

  • Hi sir,

    Thank you so much sir. The interrupt is generated after pressing the switch. again it came high after clearing the interrupt register.

    Thanks alot sir.

    Kind regards,

    Samudralankaiah.

  • Hi Samudra,

    You're welcome.  Let us know if you have any additional questions.

    Regards,

    Jonathan