The fair ( and simple ) solution ...
Hi ShortBus,
I Hope your bike is not a CB 250/350 ... no emergency brake signal needed ... cause no break at all !!! LOL ...
But ... I'd bet for a CB 750 ...
Being serious ... no interrupt needed :
a fair solution could be to use a 32.768 Khz Xtal for clock ... and let TMR 1 ( 16 Bits ) run quietly ...
that permits to use 12F683 and 16F628 as "simple" Pics.
How to ???
By polling the TMR 1 Overflow bit !!! (TMR1IF)
Let's have TMR 1 running freely : an overflow will occur after the delay you want "not to re-arm the flashing sequence" ... let it run ...
Let's use the brakes :
Overflow bit is set : engage the flashing sequence, and when releasing brakes... quit the flashing sequence and reset TMR 1 and it's Overflow bit ...
re use the brakes :
- before "Timeout" : overflow bit is clear ... continuous lighting !
- after "Timeout" : overflow Bit is set ... engage the flashing sequence !!!
32.768 Khz Xtal ??? just will need you to correct the programmed times by x 122 if using the Std "DEFINE Osc 4"
( Programmed PAUSE 10 will give 1220 ms instead of 10 ms ... so, if needed, use Pauseus :
Pauseus 1000 will give 122 ms instead of 1 ms ... )
This is just not to twist your brain on how to create " 1 - 10 seconds" delays ...
Alain ... Genuine Kawasaki H1 rider ... ha,ha,ha !!!
Last edited by Acetronics2; - 12th August 2007 at 19:22.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks