Re: Stop Light Design
From: Don Lancaster (don_at_tinaja.com)
Date: 03/28/05
- Next message: Mark Jones: "Re: Question About IC Chips"
- Previous message: Mark Jones: "Re: OT: Kozmik Rayz?"
- In reply to: Mark Jones: "Re: Stop Light Design"
- Next in thread: Mark Jones: "Re: Stop Light Design"
- Reply: Mark Jones: "Re: Stop Light Design"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 28 Mar 2005 16:52:25 -0700
Mark Jones wrote:
> John Fields wrote:
>
>>On 28 Mar 2005 12:44:23 -0800, marketing@thejrcgroup.com wrote:
>>
>>
>>
>>>I have aquired an old street stop light. The problem I have is that
>>>all of the lights stay on when I plug it in. I would like to make the
>>>light squentially turn on and off green, yellow, red, green... Like a
>>>regular stop light. I would think this would be fairly simple and
>>>inexpensive to do, however, the guys at radio shack seem to think it
>>>would be rather difficult. Thanks for any help in advance.
>>
>>
>>Brute force quick and dirty:
>>
>>start: 555 #1 turns on and drives the red TRIAC and turns the red
>> light on for ever how long you want it to be on. When it times
>> out it stops driving the red TRIAC and turns on 555 #2, which
>> drives the yellow TRIAC and turns the yellow light on for ever
>> how long you want it to be on. When it times out it stops
>> driving the yellow TRIAC and turns on 555 #3, which drives the
>> green TRIAC and turns the green light on for ever how long
>> you want it to be on. When it times out it stops
>> driving the green TRIAC and turns on 555 #1.
>>
>> goto start.
>
>
>
>
> * PIC16F84 microcontroller: www.microchip.com - about $1.00
> * JAL compiler: www.groups.yahoo.com/jallist
> * PIC programmer: http://www.google.com/search?q=PIC+programmer
>
> JAL Code to (accurately) emulate the traffic light pattern:
>
> include 16f84_04 ; timings are 4MHz
> include jlib ; standard library
>
> pin_a0_direction = output ; configure pins A0-A2 as outputs
> pin_a1_direction = output
> pin_a2_direction = output
>
> forever loop ; endless loop
> pin_a0 = on ; RED light on
> delay_1s(8) ; wait 8 seconds
>
> pin_a0 = off ; RED light off
> pin_a2 = on ; GREEN light on
> delay_1s(15) ; wait 15 seconds
>
> pin_a2 = off ; GREEN light off
> pin_a1 = on ; YELLOW light on
> delay_1s(4) ; wait 4 seconds
>
> pin_a1 = off ; YELLOW light off
> end loop ; repeat ad nauseum
Can you say BASIC STAMP?
-- Many thanks, Don Lancaster Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552 voice: (928)428-4073 email: don@tinaja.com Please visit my GURU's LAIR web site at http://www.tinaja.com
- Next message: Mark Jones: "Re: Question About IC Chips"
- Previous message: Mark Jones: "Re: OT: Kozmik Rayz?"
- In reply to: Mark Jones: "Re: Stop Light Design"
- Next in thread: Mark Jones: "Re: Stop Light Design"
- Reply: Mark Jones: "Re: Stop Light Design"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|