Louie,
There are a couple of things I found while using Instant Ints. that may be worth looking at.
I am not an expert on them, I have found out what works for me by trial and error, and error and error as with all things Pic. But when you find the solution they work great!
When entering the interrupt, I stop additional interrupts from being serviced or re-serviced until I am ready to release control again.
INTCON needs to be set, looking at bits 7,6,5 and 2 page 15 and 45-47 of the data sheet.
Code:
INTCON = %111xx1xx ' with x set for other functions and the 1's are a guess for your application
Code suggestion
Code:
'---[TMR0 - interrupt handler]--------------------------------------------
Gen_Data:
@ INT_DISABLE TMR0_INT
SEROUT2 Data_out, 108, [cksm] ' Serial out cksm value at 7812bps
PAUSEUS 3720 ' Total time= 5ms
@ INT_CLEAR TMR0_INT
@ INT_ENABLE TMR0_INT
@ INT_RETURN
END
Kevin
Bookmarks