Hi, Luis
I 've already made much worse than that ...
Darrel can confirm !!!
But your code goes straight to the pBp libraries @ location 4 , if you enable GIE ... ( I verified it with MPSIM !!! )
Program pointer passes over ALL the PAUSE library ... luckily it's the only routine here...
DANGER !!!
Alain
Last edited by Acetronics2; - 8th March 2010 at 18:16.
************************************************** ***********************
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 " !!!
*****************************************
Sitting in a loop while waiting for something to happen (in this case, polling the RAIF flag) isn't really what interrupts are about.
To be really useful, it should actually interrupt whatever your program is currently doing when RA0 changes state. For example, let's say you have a routine the is blinking PORTC.5 at a slow rate of 500mS ON and 500mS OFF continuously in a loop. If the state of RA0 changes (eg. by using a switch or sensor), then you want the blink rate to go faster rate, say 100ms ON and 100ms OFF.
Acetronics, i dunno understand, i'm newbie and my english is not excellent, but since i'm going to use IOC for a button and external INT over RA2 for measure a pulse, when i get there, i think i'll see the problem.
Meanwhile if i'm going to use INT over RA2 to measure pulse width, i do need to send first a dummy pulse before the pulse to measure?
Bookmarks