Quote:
|
Originally Posted by WizardOfAz
Yep, I'm saving PROD as well as .tmpdata. But Get_Analog_Value uses other SFRs which I'm not saving, and it would do no good anyway I guess, since if one Get_Analog_Value is interrupted by another, the first one will get a mangled value at best anyway. I suppose a possible solution is to disable interrupts in the main code while using Get_Analog_Value.
|
We're running the intergration at 100Hz using timer3. We had to disable the low priority interrupts before using Get_Analog_Value() in the mainline code, now it seems fine. The bit is INTCONbits.GIEL. Set it low to disable the low priority interrupts and high to enable them. The ISR makes one call to Get_Analog_Value() to grab the current value from the ADXRS150.