ADC speed change
Posted: Tue Apr 10, 2012 1:17 pm
Hi, all
I have Pic 18F46K20 is running at 16mhz on the internal oscillator.
I sample the ADC to look for loss of power.
When the power is lost, the clock is slowed to 32khz to save current consumption when running on the backup battery.
When I sample the ADC at 32khz (to ckeck for Power) the charge time and acquisition time is incorrect, as it is still set for 16mhz. So the ADC won’t return a reading.
Is there an easy way to change the ADC settings in Flowcode v5, so that I can sample the ADC at both clock speeds?
regards
Andrew
I have Pic 18F46K20 is running at 16mhz on the internal oscillator.
I sample the ADC to look for loss of power.
When the power is lost, the clock is slowed to 32khz to save current consumption when running on the backup battery.
When I sample the ADC at 32khz (to ckeck for Power) the charge time and acquisition time is incorrect, as it is still set for 16mhz. So the ADC won’t return a reading.
Is there an easy way to change the ADC settings in Flowcode v5, so that I can sample the ADC at both clock speeds?
regards
Andrew