Name:
enablebod
Syntax:

ENABLEBOD

Description:

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). 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'. 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

Use of the disablebod command prior to a sleep will considerably reduce the current drawn during the actual sleep command.

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

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.

Comments

  • Login to leave a comment.