Interrupt on TMR0

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
PINTO
Flowcode v5 User
Posts: 71
Joined: Fri Nov 03, 2006 2:28 pm
Location: RSA
Been thanked: 1 time
Contact:

Interrupt on TMR0

Post by PINTO »

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

Mark
Posts: 209
Joined: Thu Oct 19, 2006 11:46 am
Location: Bakewell, UK
Has thanked: 20 times
Been thanked: 16 times
Contact:

Post by Mark »

Pinto,

There is not enough information for me to help much.

However, bear in mind that RS232 comms are not instantaneous, particularly if they are waiting for a handshake routine (is there hardware handshaking used?). Also 1:128 with a low speed clock could itself give a low send rate (though 1Hz is pushing it a bit).

I suggest you set up an RS232 send loop on its own and watch with Hyprterminal on a PC to seee what happens when you make changes. RS232 is easy to get in trouble with if several other things are going on (like a recieve protocol).

Hope this helps,

Mark
Go with the Flow.

Post Reply