Good day,
Can someone please confirm if I did the proper steps in setting the correct OV_TRIP value?
From the AFE datasheet:
1. Determine desired OV.
-> Let's say I choose 4.1V
2. Read out [ADCGAIN] and [ADCOFFSET] from their corresponding registers. Note that ADCGAIN is stored in units of μV/LSB, while ADCOFFSET is stored in mV.
-> From reading ADCGAIN1 and ADCGAIN2, I got 0b00000101, and 0b10000010 respectively. Thus, ADCGAIN is 0b00010, which is 367μV/LSB. From reading ADCOFFSET, I got 0b00110000, which is 30mV
3. Calculate the full 14-bit ADC value needed to meet the desired OV trip threshold as follows: OV_TRIP_FULL = (OV – ADCOFFSET) ÷ ADCGAIN
-> Using the formula, OV_TRIP_FULL = (4.1V - 30mV) ÷ 367μV = 11090, or 10 10110101 0010
4. Remove the upper 2 MSB and lower 4 LSB from the full 14-bit value, retaining only the remaining middle 8 bits. This can be done by shifting the OV_TRIP_FULL binary values 4 bits to the right and removing the upper 2 MSB.
->The result would be 0b10110101. Would this be the correct value?
5. Write OV_TRIP and UV_TRIP to their corresponding registers.
Also, I'm not sure if this is the latest version, but I found a small typographical error (highlighted) in the datasheet:
Thank you very much,
Robert