Interrupt on TMR0
Posted: Tue Feb 06, 2007 4:35 pm
Dear Sirs.
Is the TMR0 linked to a delay Icon in any way?
I have the following situation:
I initialised TMR0 to Internal Clock, and the prescaler to 1:128 and I call a Macro called send_code.
In the send_code Macro I have a RS232 Macro sedding "FF".
After initializing the program goes into a loop called "Waiting_comms" were I've a small routine that lights up an led on and off once a second basically wainting for an interrupt on RB1, if RB1 interrupts than the program branchs else were, all this works fine except that the RS232 transmites at the same time delay as the settings on the delay macro and not the prescaler settings.
If I remove the time delays than the the RS232 doesn't send at all, if I introduce a time delay into the Wainting_comms loop than the RS232 starts to transmitting again and if I change the timming on the delay the RS232 follows suit.
Can you throw some light on the subject?
Thanks
Pinto
Is the TMR0 linked to a delay Icon in any way?
I have the following situation:
I initialised TMR0 to Internal Clock, and the prescaler to 1:128 and I call a Macro called send_code.
In the send_code Macro I have a RS232 Macro sedding "FF".
After initializing the program goes into a loop called "Waiting_comms" were I've a small routine that lights up an led on and off once a second basically wainting for an interrupt on RB1, if RB1 interrupts than the program branchs else were, all this works fine except that the RS232 transmites at the same time delay as the settings on the delay macro and not the prescaler settings.
If I remove the time delays than the the RS232 doesn't send at all, if I introduce a time delay into the Wainting_comms loop than the RS232 starts to transmitting again and if I change the timming on the delay the RS232 follows suit.
Can you throw some light on the subject?
Thanks
Pinto