Interesting stuff.
I think if anyone is really interested then they should really study the actual PIC Data Sheet.
The PIC has some 'core' bits'n'pieces surrounded by 'peripheral' bits'n'pieces.
To keep it simple check the Data Sheet of the 12F683.
So, for a simple drop of code to run we are looking at the core part and minimal peripherals.
(Assuming nothing of significance in the external circuit and conditions as specified in the Notes).
If we look at
Section 15.2 "DC Charactersitics" we can see the consumptions we can expect at various frquencies with internal or external oscillator.
And also an idea of how consumption changes with supply voltage.
If we then look at the second part of Section 15.2 the consumption figures for the
peripherals can be seen.
(
Note: Data Sheet DS41211B; this is
SECTION 15.2 and
NOT Table 15.2 - trust M'chip to confuse us
)
Other Data Sheets will usually show similar tables though fancier PICs will have fancier peripherals and power control.
I assume that Microchip will be using a good healthy expensive DMM to produce these figures ?
One aspect which is a mystery to me is whether a low-cost DMM will affect PIC performance.
Micros tend to take power as a combo of continuous power with some brief transient lumps.
And a cheap DMM , for uAmps, will shove in a relatively high value resistive shunt to determine voltage drop to measure current.
Will that voltage drop affect the PIC? Are some DMMs worse than others?
I really don't know, probably not, but it's worth a thought or two as opposed to guessing/hoping
.
You'll never get really accurate values in 'Sleep' as you're relying on the internal LF osc. as the clock.
As many will be aware, there is a 'native' command SLEEP which puts PIC to sleep forever but the WDT int is used to pop it out and check and continue to provide your BASIC 'Sleep' command. And you will also know that the WDT time is adjustable.
If you study the Data Sheets you will see how to check peripheral status and see how some/all can be switched on/off with a suitable POKE.
With careful use of this and adjusting clock speeds where necessary you should be able to produce a reliable device using minimal power.
Apologies for too many lines of drivel above.