Low power, ADC, and SFR pokes ??

lbenson

Senior Member
In this thread-- http://www.picaxeforum.co.uk/showthread.php?t=5950 --Hippy, Dippy, and BeanieBots, among others, discussed ADC issues, with a conclusion (again among others) that "for low-power people (doing the occasional A/D) it looks like a quick poke might be in order to switch off ADC module". But which particular poke was not made explicit. I still can't find Hippy's SFR exposition. Anyone able to say what register to poke, and how, to turn off the power consumption of the ADC module between infrequent uses under battery power?

By the way, Dippy's absence is noted with regret--any SFR registers to poke to re-initialize his activity?
 

hippy

Technical Support
Staff member
I think it was someone other than me who mentioned shutting the ADC down, but a look in the 16F88 (18X) datasheets suggests that's done by clearing bit 0 of ADCON0 ($1F), so ...

- POKE $1F,0

should do the trick. A safer bet may be ...

- PEEK $1F,b0
- bit0 = 0
- POKE $1F,b0

SFR's are usually in the same places across the 16F range but check the datasheet first.
 

demonicpicaxeguy

Senior Member
if you wanted to get even less consumption out of it there is the oscilator config registers where you can get things running 32khz,200khz,1mhz as well

if you need to preserve battery life but you still want it to do some serious processing to monitor inputs and such 1mhz on the internal oscillator isn't too bad
 

lbenson

Senior Member
Thanks, hippy--ADCON0 it is. I want to do this on an 08M--I see on the Microchip datasheet that the register is $1F there as well.

dpg--I'm using the 32khz setting, just wanted to find out how to wring out another few mW if possible. I've noted most of the low-power posts in the past year+, now I'm trying to integrate them.
 

wildside

New Member
Hello: I'm new to this so please excuse simple questions. I'm using an 08M2 with an an ADC read every 15 minutes (checking voltage from a photo diode to see if it's daylight). Will this work to save power:

Do
readadc10 4,w1 'test light level voltage
if w1> 50 then start 'jump to start if b1 is >50
Pokesfr $1f,0 'turn ADC module off
Sleep 390 'sleep ~15 minutes
Loop 'repeat

Thanks for any suggestion.
 

Technical

Technical Support
Staff member
Welcome to the forum. Those earlier posts are over 5 years out of date.
You can simply remove the pokesfr line all together - the ADC is turned of automatically via sleep on current PICAXE parts like the 08M2.
Disablebod will help though.
 
Top