Page 1 of 1

sleep switch

Posted: Tue Jan 06, 2009 1:53 pm
by Gaz
Hi all and a happy new year!

Ok, I'm slowly getting to grips with flowcode and have put a program together to simulate a set of traffic lights for my sons play mat (street scene)
I would like the pic to go to sleep after say 10 mins to save the battery (he will lose interest after this time) and then I would like to awaken the pic again using a push to make non latching switch.
I am using the 12f629 chip using the internal osc.
I posted a thread late last year regarding the use of non latching switches but the reply, from Ben I think, shot over my head with the speed of a hamas rocket! I'm a programming virgin remember!

Could anyone point me in the right direction as to how to do this?
Ive attached the flowcode file for information.

cheers

Gaz

Re: sleep switch

Posted: Tue Jan 06, 2009 3:59 pm
by Gaz
Its ok


sorted it :lol:

Re: sleep switch

Posted: Tue Jan 06, 2009 5:56 pm
by Benj
The dreaded 12F chips eh. Great news you got it working.

Re: sleep switch

Posted: Wed Jan 07, 2009 8:25 am
by Gaz
Are the 12F chips usually hardwork then Ben?
The only problem I had was spurious oscillator speeds which seemed to be cured by decoupling the unused outputs with caps.
Pulling the unused outputs to ground or positive just stopped the thing working altogether :roll:

Gaz

Re: sleep switch

Posted: Wed Jan 07, 2009 10:16 am
by Benj
They are good little devices but they can be tempremental especially to program.

Your example of putting caps on the unused pins is a great example of this.