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.
Hi, in the related post
"With hysteresis disabled, you sweep the COMPDAC upwards and downwards and average out the two trip points. You set your COMPDAC to this trip value. "
But how can I get COMPDAC value at the exactly time when the comparator is tripped? It's not possible that every time I manually add 1 to COMPDAC and see if the comparator output change from 0 to 1 or 1 to 0.
Hi Howard,
You need to use the latch. The basic flow is below:
1. Set COMPDAC value.
2. Wait.
3. Clear latch.
4. Wait.
5. Check if latch was set: see below
Down-Sweep Calibration
i. If doing a down-sweep calibration, you've found your calibration code if the latch was set from step 5 above.
ii. If the latch is still clear, decrease COMPDAC value by 1 and repeat from step 2.
iii. This is your trip code.
Up-Sweep Calibration
i. If doing a up-sweep calibration, you've found your calibration code if the latch is clear from step 5 above.
ii. If the latch is still set, increase the COMPDAC value by 1 and repeat from step 2.
iii. This is your untrip code.
Trip and untrip code are usually 1 LSB apart.