Real time and PbP ... take care !!!
[QUOTE=ChrisHelvey;35917]
ON INTERRUPT GOTO spark: ' When hall effect is sensed, go make a spark
Hi, Chris
That single line hurts me as a "BASIC" interrupt ...
This means the program ALWAYS will complete the task ( Statement) it is currently doing ... before entering the interrupt stubb.
You Have to use Assembler interrupts if you want precise and repetitive timing ...
Now, you want to use 12F683 ... why not !!! have a look to what the CAPTURE module of the PIC can do for you ...
generate the detect interruption ... Measure the rotation period ( TMR 1 ) ... and also measure the real computing time ... for example !!!
a second 16 bits timer will be necessary ... if spark has to occur AFTER the hall effect is detected ( TMR1 cleared !!!) ... so you'll have to build it "manually" !!! 12F683 only has one ( 16F877 ... too ) !!!
Alain
Last edited by Acetronics2; - 8th April 2007 at 15:36.
************************************************** ***********************
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