Self power down

Captain Haddock

Senior Member
Hi all, been away from this for a while and brain has faded on me.
Whats the easiest way to have a program run on a button press and totally power down at the end of the program till next button press?
I've tried a npn transistor activated at the start of the program to supply the 0V to the picaxe and deactivated at the end using the button to supply momentry power to start it off but it just keeps running, if I use a small relay after the transistor it works ok but not wanting to use that much power or space.
I'm assuming I'm just using the wrong type of tranny and it's letting enough through when deactivated to run a picaxe but not enough to energise the relay.
Any pointers appreciated.
Code as follows, transistor is on C.1, goto main is there to check if it powers off:
Code:
#picaxe 08M2
high c.1

main:
let b0 = 21
for b1 = 1 to 10
irout c.2,1, b0
high c.2
pause 500
next b1
;debug
low c.1

goto main
 
Top