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: Some question about TIC12400-Q1

Part Number: TIC12400-Q1
Other Parts Discussed in Thread: TIC12400

Hi Sir,

We are using TIC12400-Q1 for our new project, but now we encounter a problem. After adjusting the write value of the In0 threshold register, the interrupt processing is not responded. (In0 is connected to BATT_14.4V_ADC).  The register parameter setting as follows:

1. Initialization register		
	Address	spi command		
	1Ah	reg_val[0]=0xb4;		
		reg_val[1]=0x00;		
		reg_val[2]=0x00;		
		reg_val[3]=0x01;		
				
	32h	reg_val[0]=0xe5;		
		reg_val[1]=0xff;		
		reg_val[2]=0xff;		
		reg_val[3]=0xff;		
				
	1Bh	reg_val[0]=0xb6;		
		reg_val[1]=0x00;		
		reg_val[2]=0x1f;		
		reg_val[3]=0xfe;		
				
	24h	reg_val[0]=0xc8;		
		reg_val[1]=0x00;		
		reg_val[2]=0x00;		
		reg_val[3]=0x09;		
				
	1Ah	reg_val[0]=0xb4;		
		reg_val[1]=0x00;		
		reg_val[2]=0x10;		
		reg_val[3]=0x00;		
				
	29h	reg_val[0]=0xd2;		//thresHold register  THRES1:1024   THRES0:20
		reg_val[1]=0x1f;		
		reg_val[2]=0xf8;		
		reg_val[3]=0x29;		
				
	2ch	reg_val[0]=0xd8;		
		reg_val[1]=0x0c;		
		reg_val[2]=0x0f;		
		reg_val[3]=0xfe;		
				
	2eh	reg_val[0]=0xdc;		
		reg_val[1]=0x49;		
		reg_val[2]=0x24;		
		reg_val[3]=0x91;		
				
	2fh	reg_val[0]=0xde;		
		reg_val[1]=0x01;		
		reg_val[2]=0x3c;		
		reg_val[3]=0x93;		
				
	25h	reg_val[0]=0xcb;		
		reg_val[1]=0x00;		
		reg_val[2]=0x00;		
		reg_val[3]=0x05;		
		
2. Read In0 voltage(In0 was connected with BATT_14.4V_ADC)
	Address	spi command	
	0Ah	reg_val[0] = 0x14;	     
		reg_val[1] = 0x00;
		reg_val[2] = 0x00;
		reg_val[3] = 0x01;



Question 1:

From the Datasheet we know that 0x29h is the threshold setting register. The register value are set as follows:

	29h	 reg_val[0]=0xd2;		//thresHold register  THRES1:1024   THRES0:20
		 reg_val[1]=0x1f;		
		 reg_val[2]=0xf8;		
		 reg_val[3]=0x29;

Here THRES0 is 20. If the reference voltage is 6V, then the set threshold is 20*6000/1024=1172mv. Is my understanding correct? By changing the value of this register, increase the In0 threshold value and adjust the input voltage of the regulated power supply, but the interrupt processing is not responded. Is the value of the above register set correctly? Are other registers missing?

Question 2:

For the data read back by SPI, 1-10bit is the voltage value of IN0_ANA? How to calculate the actual voltage value?

Read In0 voltage register parameter setting as below:

	Address	  spi command	
	0Ah	      reg_val[0] = 0x14;	     
		      reg_val[1] = 0x00;
		      reg_val[2] = 0x00;
		      reg_val[3] = 0x01;

Thanks,

Best Regards

  • Hi Lumina, 

    Thanks for your question. We'll review it and get back to you tomorrow after the US holiday. 

    Regards,
    Eric Schott

  • Hi Eric,

    Now we can enter the interrupt by adjusting the operation sequence of the register. Our interrupt type is set to falling edge trigger. For in0, it will trigger an interrupt when the voltage is less than the set threshold (voltage adjustment from large to small).

    But now we have a new problem. That is, the voltage converted by the ADC is more than 200mv larger than measured by the multimeter. So we want to know the cause of this problem, can u support this?

    I have added the adjusted register setting to the below and hope it can do some help.

    1. Initialization register		
    	Address	spi command		
    	1Ah	reg_val[0]=0xb4;		
    		reg_val[1]=0x00;		
    		reg_val[2]=0x00;		
    		reg_val[3]=0x01;		
    				
    	32h	reg_val[0]=0xe5;		
    		reg_val[1]=0xff;		
    		reg_val[2]=0xff;		
    		reg_val[3]=0xff;		
    				
    	1Bh	reg_val[0]=0xb6;		
    		reg_val[1]=0x00;		
    		reg_val[2]=0x17;		
    		reg_val[3]=0xff;		
    				
    	24h	reg_val[0]=0xc8;		
    		reg_val[1]=0x00;		
    		reg_val[2]=0x00;		
    		reg_val[3]=0x09;	
    
    				
    	2ch	reg_val[0]=0xd8;		
    		reg_val[1]=0x0c;		
    		reg_val[2]=0x0f;		
    		reg_val[3]=0xfe;	
    
    				
    	2eh	reg_val[0]=0xdc;		
    		reg_val[1]=0x49;		
    		reg_val[2]=0x24;		
    		reg_val[3]=0x91;
    
    	2fh	reg_val[0]=0xde;		
    		reg_val[1]=0x01;		
    		reg_val[2]=0x3c;		
    		reg_val[3]=0x93;		
    				
    	25h	reg_val[0]=0xcb;		
    		reg_val[1]=0x00;		
    		reg_val[2]=0x00;		
    		reg_val[3]=0x05;
    
    	29h	reg_val[0]=0xd2;		//thresHold register  THRES1:1024   THRES0:20
    		reg_val[1]=0x1f;		
    		reg_val[2]=0xf8;		
    		reg_val[3]=0x29;			
    			
    				
    	1Ah	reg_val[0]=0xb4;		
    		reg_val[1]=0x00;		
    		reg_val[2]=0x10;		
    		reg_val[3]=0x00;		
    
    2. Read In0 voltage(In0 was connected with BATT_14.4V_ADC)
    	Address	spi command	
    	0Ah	reg_val[0] = 0x14;	     
    		reg_val[1] = 0x00;
    		reg_val[2] = 0x00;
    		reg_val[3] = 0x01;
    
    
    
    
    
    

    Thanks,

    Best Regards

  • Hi Lumina,

    Here THRES0 is 20. If the reference voltage is 6V, then the set threshold is 20*6000/1024=1172mv. Is my understanding correct? By changing the value of this register, increase the In0 threshold value and adjust the input voltage of the regulated power supply, but the interrupt processing is not responded. Is the value of the above register set correctly? Are other registers missing?

    I think your calculation is off. The following calculations can be found in the Steps to Configure TIC12400-Q1 Multiple Switch Detection Interface (MSDI) Application Note.

    ADCcode = Vinx * 1024 / 6V 

    Therefore:

    Vinx = ADCcode * 6 / 1024 = 20 * 6 / 1024 = 0.1172V or 117.2mV

    What is the voltage you are measuring with your multimeter, and what is the ADC code you are reading (ANA_STAT0 register)?

    Regards,

    Jonathan