Using pause command i donīt see if any other input. What i want is put my output high during 20s but at the same time see if other input goes high. If it goes high i will start over again, my time goes to 0s, and i will start counting 20s
Using pause command i donīt see if any other input. What i want is put my output high during 20s but at the same time see if other input goes high. If it goes high i will start over again, my time goes to 0s, and i will start counting 20s
Hi, leonel ...
Don't shout at me but I did something like that with a resettable 555 and some CD4000 logic ... it was in one of my prior lives.
Said honestly, the 16F57 is not really the best Choice here ...
Alain
Yes, i know thatīs not the best choice, but itīs what i havei know that with some logic i can do that, but i have 8 inputs and mixing all together i will need "some CD4000" and i have space problems
(in my box i have to put 8 relays, and all electronic...), thatīs why i want to use a cheaper PIC...
Your project looks like a quizz box ...
20 second to answer ... who's the quickest of 8 !!!
we REALLY need to know a lot more about your top secret weapon. ...
if you really want help, of course
Alain
Hello Loenel,
How accurate does it have to be on blinking every 20 seconds?
We now have concluded that there is muching going on, thus, it is not just a simple "Blink" a light.
1. How long of a pause is allowed?
For example: Untested... but the idea is there...
Granted, this is a "oversimplification" of code. But it is a generic program that will allow lights to be blinked and still scan keys once ever 1/1000 of a second (with the exception of a blinky light.Code:Counter1 var word Counter2 Var word Loop: Counter1=0 Counter2=0 Loop2: if Counter1< 20 if Counter2 <1000 Pause 1 'Pause 1/1000 of a second CheckButtons.... Do stuff... CheckButtons.... Do Stuff if CheckButtons==Pushed then goto Loop Counter2=Counter2+1; Endif if(Counter2>=1000) Counter1=Counter1+1; counter2=0; endif endif if Counter1<20 goto Loop2 Blink light = on Pause 200 'pause 1/5 of a second to light up the light. Blink Light = off goto Loop:
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Ok, i'll explain my secret weapon
I have 8 buttons that will control relays. One button corresponds to one relay. If itīis pressed i turn on the relay and stays on for 20s or 40s (depending the position of a switch). If one button is pressed while one relay is on the time goes to begin and the two relays stays on again 20s or 40s. On led is on if one relay is on...
Hereīs my secret weapon
It was simple if i was using PIC16F872 (thatīs the PIC i know better...)
My pulse itīs 200ms and the time itīs not critical (if i have 17s instead 20s thatīs ok)
ok ..something usable now ...
Last edited by Acetronics2; - 30th June 2005 at 10:29.
Bookmarks