AnsweredAssumed Answered

How can I cause interrupt from ADC compare?

Question asked by melvin blades on Jan 12, 2014
Latest reply on Jan 13, 2014 by melvin blades

I want to  create an interrupt that occurs when an ADC channel input crosses a voltage threshold.


I'm using processor expert, on a K40  (but would be happy to have non-processor expert help!)


In processor expert, I  have created an AnalogComp_LDD   component

This component has

1 positive input  : CMP0_IN4


I want the 2nd input to be from the internal DAC and be able to select the output of the DAC.

So within  the AnalogComp_LDD component,  I set the negative input to Dac6 output , sourced internally  from  component DA2

[I'm not sure why one is positive and one is negative. They are both positive voltages.]


Component DA2 is configured to to an initial value of 32  which should be 1/2 of the refrerence voltage since there is 6 bits of resolution and the full range is 0-64.


My "code" does get an initial interrupt on startup.  But does not get another interrupt. regardless of the signal I put on  the input.


Any suggesteions on what to try or alternate methods is appreciated.