sleep switch

Any general or miscellaneous queries that do not fit into the other forum catagories

Moderators: Benj, Mods

Post Reply
Gaz
Posts: 18
Joined: Thu Dec 11, 2008 10:02 am
Contact:

sleep switch

Post 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
Attachments
traffic lights.FCF
(5 KiB) Downloaded 220 times

Gaz
Posts: 18
Joined: Thu Dec 11, 2008 10:02 am
Contact:

Re: sleep switch

Post by Gaz »

Its ok


sorted it :lol:

User avatar
Benj
Matrix Staff
Posts: 15009
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: sleep switch

Post by Benj »

The dreaded 12F chips eh. Great news you got it working.

Gaz
Posts: 18
Joined: Thu Dec 11, 2008 10:02 am
Contact:

Re: sleep switch

Post 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

User avatar
Benj
Matrix Staff
Posts: 15009
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: sleep switch

Post 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.

Post Reply