Air Circuit Breaker Control

Mark.R

Member
Hi, I am new to the world of programable IC so please bear with me.
I work with larg control gear which requiers a 2sec pulse to close and a 2sec pulse to open again.
I have built a unit using to multi-function timers so that when I recive a "high" on the input I get a 2sec pulse from output 1 and when it gose back "low" I get a 2sec pulse from output 2.
My question is, is there any way of programing a Picaxe chip to do the same job in a more elegant way.
Any help would be greatfuly recived Iv had a go and can't seem to get it.

Thanks

Mark
 

Technical

Technical Support
Staff member
Code:
main:
   if pin1 = 1 then sw_on
   goto main

sw_on:
    high 1
    pause 2000
    low 1
sw_on_loop:
   if pin1 = 0 then sw_off
   goto sw_on_loop

sw_off:
    high 2
    pause 2000
    low 2
    goto main
 
Top