hey guys/gals ive been wondering about ADC... i know you can setup the adc on a pic to interrupt when complete but is it possible to setup to interrupt on change?
hey guys/gals ive been wondering about ADC... i know you can setup the adc on a pic to interrupt when complete but is it possible to setup to interrupt on change?
oh yeah!!! nice one Nigel heh thanks i even forgot about that.
So i can simply have 2 global variables :
1 = oldADC
2 = isNew
On interrupt clear isNew var and check the old ADC value store in oldADC against the new one and if new set the isNew flag and set the oldADC variable to the new data. Correct?
oh yeah!!! nice one Nigel heh thanks i even forgot about that.
So i can simply have 2 global variables :
1 = oldADC
2 = isNew
On interrupt clear isNew var and check the old ADC value store in oldADC against the new one and if new set the isNew flag and set the oldADC variable to the new data. Correct?
I read somewhere that you could use an interrupt from a comparator, but I don't see how that would apply if you don't know what it is changing from, but if it changes from V+ or some value you set, it could be done and the ADC would not need to be running all the time .