This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

COMP and external reference

Hi,

I'm trying to compare two RC networks by using GPIOTE, PPI, a Timer and the comparator to measure the time needed for a charge and discharge cycle for each of the networks and then comparing the values.

At the moment I'm using the comparator in single ended mode with VDD as reference and this is working, but the results are pretty noisy. Part of the noise is obviously coming from the reference voltage, because doing the measurements inside a high priority timeslot is reducing the noise significantly.

For further improvements I want to supply VDD externally to AIN0 through a low pass filter (1.2kOhm, 2.2uF), but after changing the reference from NRF_COMP_REF_VDD to NRF_COMP_REF_ARef and ext_ref to NRF_COMP_EXT_REF_0 the output of the comparator is always zero.

Is there anything else to do or enable to use an external reference?

Parents
  • Hi Stefan

    I'm using the comp in single ended mode, ISOURCE and is off, the behaviour is the same on both reference input pins. Hysteresis is off, too, the threshold voltage is reconfigured after up events to measure the time needed to charge the capacitor from 24/64Vin up to 40/64Vin and discharge back to 24/64*Vin.

    I did some further testing with different input voltages on the reference input. The output is not always zero, but with REFSEL set to 7 the comparator seems to be always in differential mode, regardless of the setting in the MODE register.

Reply
  • Hi Stefan

    I'm using the comp in single ended mode, ISOURCE and is off, the behaviour is the same on both reference input pins. Hysteresis is off, too, the threshold voltage is reconfigured after up events to measure the time needed to charge the capacitor from 24/64Vin up to 40/64Vin and discharge back to 24/64*Vin.

    I did some further testing with different input voltages on the reference input. The output is not always zero, but with REFSEL set to 7 the comparator seems to be always in differential mode, regardless of the setting in the MODE register.

Children
No Data
Related