I think the main loop is taking too long, hence the serial interrupt can't receive all 8 bytes properly. Still trying to reduce the serial processing time in main loop.
I think the main loop is taking too long, hence the serial interrupt can't receive all 8 bytes properly. Still trying to reduce the serial processing time in main loop.
Could be, but it won't affect Instant Interrupts. It doesn't pay any attention to what the main loop is doing. Unlike ON INTERRUPT.
But if there was something in the main loop.
Like Steve may have hinted ...
Can't say without more information/code.
Gimmee gimmmee ....
<br>
DT
Note that in the Int_RX ISR, the INT is disabled.
In the main loop, I will check the serial data whether the serial data match a predefined format before it is enabled again in main loop. I didn't use any pause for this serial data checking, I want it to check all 8 bytes before determining which command to execute. I use RB INT, but this INT is not trigger during serial comm. I also use ADC in main loop with PAUSE.
One thing I'm not really sure is how does "HSERIN 100, Timeout, [ STR datain\8]" really work in ISR? From this thread, it said it receive 2 bytes, this means ISR need to execute another 3 times to receive 8 bytes completely?
If the packet size is always 8 bytes, declaring datain as 8 bytes is sufficient right?
I remembered if PC send 8 bytes to PIC, the LED is not toggle, meaning this Int_RX ISR is not trigger at all.
Should I use "@ INT_DISABLE RX_INT" in ISR or main loop? When is the proper time to enable RX_INT again?
Last edited by Pic2008; - 30th January 2009 at 05:18.
After going through the code over and over again, I still can't find the problem until my colleague check her application code which sends the 8 bytes. There is a bug from her application.
Now, the problem is solved, PIC confirmed can receive 8 bytes using DT interrupt.
Thanks for all the guidance.
Bookmarks