Interupts
Posted: Tue Aug 14, 2007 11:32 am
Interrupts
I have a line of flow code symbols which are my opening code to the program, among other things they reset variables and memory to zero.
The penultimate call is to enable Timer0 which calls a service routine. The interrupt frequency is set to 19200 Hz.
The first thing I do in my interrupt service routine is to disable interrupts (TIM0), so as to avoid the routine being interrupted.
At the end of the interrupt service routine, I re-enable TIM0.
In the opening code which first enabled TIM0, I have an input routine placed after the TIM0 enable statement. This input routine never gets called.
At first thought that the interrupt frequency was so fast that as soon as my interrupt service routine re-enabled TIM0, it was recalled. So I moved the re-enable TIM0 statement to a position after my input routine call.
But it still never gets called, so I am beginning to think that interrupts do not have pointers which inform them where to return to ? Or I am not resetting a flag somewhere.
Is it possible to find an explanation of what calls Flow Code actually makes when the user uses En-TIM0 and call this routine type statements?
I took a quick look at the microchip website and it spoke of PCLATH and Status, and not using paged memory locations, but without knowing how much of this is implemented by flow code, I don't know how to proceed.
Also, I have noticed that having produced code in which TIM0 successfully calls a working routine, simply enabling TIM1 stops all interrupts from firing.
Sorry to be a numpty
Geo
I have a line of flow code symbols which are my opening code to the program, among other things they reset variables and memory to zero.
The penultimate call is to enable Timer0 which calls a service routine. The interrupt frequency is set to 19200 Hz.
The first thing I do in my interrupt service routine is to disable interrupts (TIM0), so as to avoid the routine being interrupted.
At the end of the interrupt service routine, I re-enable TIM0.
In the opening code which first enabled TIM0, I have an input routine placed after the TIM0 enable statement. This input routine never gets called.
At first thought that the interrupt frequency was so fast that as soon as my interrupt service routine re-enabled TIM0, it was recalled. So I moved the re-enable TIM0 statement to a position after my input routine call.
But it still never gets called, so I am beginning to think that interrupts do not have pointers which inform them where to return to ? Or I am not resetting a flag somewhere.
Is it possible to find an explanation of what calls Flow Code actually makes when the user uses En-TIM0 and call this routine type statements?
I took a quick look at the microchip website and it spoke of PCLATH and Status, and not using paged memory locations, but without knowing how much of this is implemented by flow code, I don't know how to proceed.
Also, I have noticed that having produced code in which TIM0 successfully calls a working routine, simply enabling TIM1 stops all interrupts from firing.
Sorry to be a numpty
Geo