ISRRX and Timer simultaneously?
Moderators: David Barker, Jerry Messina
ISRRX and Timer simultaneously?
Can ISSRX.bas and Timer.bas coexist in the same program? I've set one to high priority and the other to low priority, but I still can't get them working at the same time.
I use my own serial interrupt routine(very simple) as high priority and a 1ms timer on low priority.
In my routine I use the#option ISR_SHADOW = false
In high priority interrupt I use Save (FSR0, PRODL)
In low priority I use Save(0)
I disable all interrupts before starting initialisation then enable low priority followed by high priority, finally turn on the interrupts as the last thing.
I am not sure which chip you are using but you have to explicitly turn on the priority with RCON.7=1.
This is the first phase of the initialisation
I can not post more as its all aliased names in my project and would not make much sense.
Hope that helps a little.
In my routine I use the#option ISR_SHADOW = false
In high priority interrupt I use Save (FSR0, PRODL)
In low priority I use Save(0)
I disable all interrupts before starting initialisation then enable low priority followed by high priority, finally turn on the interrupts as the last thing.
I am not sure which chip you are using but you have to explicitly turn on the priority with RCON.7=1.
This is the first phase of the initialisation
Code: Select all
INTCON=%00000000 'Global Interrupt Enable(GIE, bit7) OFF
IPR1=%00100000 'interrupt priority, only EUSART is high priority, all others low priority
IPR2=%00000000 'all other peripherals are low priority
RCON.7=1 'enable interrupt priority
Hope that helps a little.