Running code after disablebod

kennethm

New Member
Is it wise to run code right after a disablebod command, as opposed to just the sleep command as illustrated in the picaxe manual ?

The reason i am asking is because due to the way my code is structured an interrupt may occur in the following code

Code:
disablebod
sleep 10
enablebod
and since I have reached the limit of my 14M program space, adding an extra enablebod in the interrupt routine will consume an extra byte. Rather than hunting for that excessive byte, i was wondering if I could do without it.
 

hippy

Ex-Staff (retired)
There's no simple answer to the question. A PICAXE can run entirely with BOD enabled or disabled, it's what happens when the battery voltage gets low or browns-out which will differ, and the effect it has depends upon the code being run.

My rule of thumb is that 10% of code space can often be fairly quickly reclaimed from unoptimised code so it would be worth considering doing some optimisation. If you don't want to do it yourself you could post your code and other people will likely help identify parts of your code suitable fr optimisation.
 

kennethm

New Member
Hippy,

Your rule of thumb rules the day. I managed to squeeze one more extra byte out of my Picaxe.

Thanks for the answer though.
 
Top