Enable the on-chip brown out detect function.

Some PICAXE chips have a programmable internal brown out detect function, to automatically cleanly reset the chip on a power brown out (temporary voltage drop below the minimum operating voltage). The brown out detect is always enabled by default when a program runs.

However it is sometimes beneficial to disable this function to reduce current drain in battery powered applications whilst the chip is 'sleeping'. However you must still ensure that the operating voltage does not drop below the minimum operating voltage or else unreliable behaviour may occur.

The brownout voltage is fixed for each device as follows:

1.8V 28X2-3V, 40X2-3V
1.9V 20X2, 14M2, 18M2, 20M2, 28X2, 40X2
2.1V 08, 08M, 14M, 20M, 28X1, 40X1
2.4V 08M2
3.2V 28X2-5V, 40X2-5V
None 18, 18A, 18M, 18X, 28A, 28X, 40X


Applies To:
All (except 08, 18, 18A, 18M, 18X, 28, 28A, 28X, 40X)
See Also:
Related Create:

Enabling brown out detection

This program will disable the brown out detection for 23 seconds then re-enable it.

Code Example:
main:	disablebod	; disable brown out
	sleep 10	; sleep for 23 seconds (10x2.3)
	enablebod	; enable brown out
	goto main	; loop back to start
Copy Code Submit an Example

Submit Your Own Code!

You must be logged in to submit code examples. Login now.