Rob,
I don't think the ADC module will accomplish what you are attempting as Henrik stated in his last reply.
You should look into the Comparator of the PIC, again as Henrik suggested.
![]()
Rob,
I don't think the ADC module will accomplish what you are attempting as Henrik stated in his last reply.
You should look into the Comparator of the PIC, again as Henrik suggested.
![]()
Regards,
TABSoft
You can use the ADC to sample the voltage but the PIC needs to be awake for the ADC to operate and, again, the ADC doesn't run continously and can not automatically generate an interrupt when a given voltage or threshold is detected. You'd need to wake the PIC up every now and then, sample thevoltage at the pin and based on that determine if you should stay awake or go back to sleep. No problems doing that but to me it looks like you'll be better served by using comparator module. Using that you can put the PIC to sleep and it will automatically wake up when the comparator output flips.
/Henrik.
Bookmarks