disabling all other interrupts was done assuming that after exiting the current INT routine, no other interrupt would occur except RX_INT...
the thing that bother me is that once wheel speed is too slow for POV display, I have the same TImer1 interrupt routine to draw less complex graphics,
so it execute a bit faster,
and then It let me update any parameters I want thru RX_INT.
This is as if the PIC won't even read a PIN status when the Timer1 routine is too busy.
I have tried low/high priority INT, but then my timer was behaving poorly
since I have you here Darrel, is it right to put @INT RETURN in a if condition, to exit an interrupt faster than normal?
Code:
;--- SIGNAL from Hall Fx sensor B ----------------------------
int1_halfxb:
if INTb2_RxInc = 1 then ; stop INTERUPTS if incoming Rx
Timr1Start = 0
@ INT_DISABLE INT0_INT ; state of interrupts at start
@ INT_DISABLE INT1_INT ; state of interrupts at start
@ INT_DISABLE TMR0_INT ; state of interrupts at start
@ INT_DISABLE TMR1_INT ; state of interrupts at start
ledRFpriority = 1
@ INT_RETURN ; Return to program, (humm that looks clever for instants Ints!!)
; Should add a watch dog for restart
endif
LEDC1 = 1
cled = 0
FinishedPixel = 0
redrawLoop = 0
doDoneTxt = 1 ; this will enter txt display first
ledpattern = 0
pattern_repeat = 3
TMR1H = $00 : TMR1L = $00 ; reload preload max value, we want a little delay
pauseus SensorB_offset ; for fine tuning
if (NoDisplay = 0) and (INTb2_RxInc = 0) then Timr1Start = 1 ; enable pixel timer
@ INT_RETURN ; Return to program
code need a bit of cleanup, I will try to make it more readable soon
Bookmarks