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