Brown out fuses

dceejay

New Member
so what are the disadvantages of disablebod ? If I use it and then the battery does go flat what could be the consequences ?
 

Dippy

Moderator
It is possible, and it's probably circuit dependent, that you can get erratic behaviour and osc changes at lower Vs. When the PIC is at lower voltages and especially with power glitches it is possible for some registers to get into a bit of a pickle and mugger up the programme or produce some weird results. And without the BOR you could have some unpredictable reults.

The BOD/BOR will, when the V is restored above Vbor, ensure a proper reset so your programme can start cleanly. Needless to say, it relies on your external circuit behaviour too.

With a bit of good circuit design I'm sure you can operate things OK without BOD and save power but in most cases leave it on.
It may also hinder power off/on manual resets too. I had quite a lot of programming problems with an 08M with bod/bor off - which were probably due to inexperience.

I also read something about EEPROM data protection but I'm not sure about that.
I daresay there are many other issues too so unless you have a specific reason (and have a good understanding of electronics) I'd say leave it enabled.

Try it, it won't blow up. But it may be painful.

PS. I'll just add that whilst this option can be used successfully, you should be aware of the charcteristics and the what-will-happens of PICs under certain conditions. You really ought to spend some time reading about BOD/BORs and the elctrical properties of PICs - this will require reading DATA SHEETs (what! 400 pages! You must be joking!) ... and dabbling of course!



Edited by - Dippy on 13/01/2007 15:13:36
 

dceejay

New Member
Ah ok - if in doubt don't use it... but if you do make sure you re-enable as soon as possible.

However the power saving I see from 5mA (sleep with BOD on) and 5uA (sleep with BOD off) is well worth it for battery life in non critical applications :) ... so I'll risk it and see what happens...

PS - found this in an (ahem) Atemel spec... shorter to read :) but I'm sure the principle is the same...

The single-most important analog module in terms of power consumption during a sleep
mode is the brown-out detector (BOD). A BOD protects the microcontroller when the
supply voltage falls below its operating threshold by resetting the device. This keeps the
microcontroller in a defined state when the Vcc is below its operating threshold. The BOD
is not important to the microcontroller while it’s in sleep mode but it is extremely important
when it wakes up. Therefore, as a rule, most microcontrollers keep the BOD active during
sleep mode and it contributes substantially to sleep mode power consumption.

There are two ways of getting around BOD power consumption in sleep: making a “zeropower”
BOD or turning the BOD off altogether.

Since the BOD must be functional when the controller wakes up, making a zero-power
BOD may seem like the most attractive option. However, lowering the power to the analog
module can make it very slow and make it respond too slowly to an out-of-range voltage
supply. Since the microcontroller is not running any code or writing or erasing the Flash or
EEPROM in sleep mode, the BOD is not really necessary. However, it does need to be
operational the moment the controller wakes up. The solution to this problem is to have the
microcontroller shut down the BOD when it enters sleep mode and start it again just
before leaving sleep mode. This approach ensures the BOD is functioning when it is
needed without any current penalty while in sleep mode.

 

Dippy

Moderator
Sage advice.

Where did you get those current figures from?
As an example I would strongly suggest taking a PIC Data Sheet for bed-time reading.

Example: PIC 16F87/88 data sheet (18X=88).
Look at Table 18.2 for BOR example figures.
Other tables will indicate Sleep (osc s/d) currents.

And then you may think about underclocking for lower running power too - if speed and baud rates etc aren't important. Anyway, you can always clock up and down etc. where and when necessary.

Lots to think about so get those specs on.

And then of course, there is the rest of your circuit...
 

dceejay

New Member
The current values are what I am measuring on my circuit using PicAxe 08m. Admittedly with a cheap £5 multimeter so may well be out at the uA level- but definately several orders of magnitude difference between sleep currents with brown out disabled vs enabled.

Reset of circuit not a problem :) - am using the Easy Radios from LPRS.co.uk so "easy"... - am actually controlling power to it via one of the data pins so it is fully off when asleep.
 
Top