Timer2 call with Timer2 disabled

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

Moderator: Benj

Post Reply
User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Timer2 call with Timer2 disabled

Post by Jan Lichtenbelt »

I use timer2 and timer4. I get silly result using timer2 and timer4.

To find out what happens I disabled (did not enabled) timer 2 by means of goto label A in macro "Send_Bits". Nevertheless the timer2 interrupt macro "Timer2_Interrupt" is called by the program. This can easily be shown because this interrupt macro is the only one which can change the output state of B0. And I see B0 changing with 77.5 Khz.

How can help me?


Kind regards

Jan Lichtenbelt

PS. In the meanwhile I produced the same program also in Flowcode5. That one works as it should be / as expected.
Attachments
DCF_transmitter_F5_V1.fcf
Flowcode 5
(22.17 KiB) Downloaded 219 times
DCF_transmitter_V1.fcfx
Flowcode 6
(22.44 KiB) Downloaded 192 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Timer2 call with Timer2 disabled

Post by Benj »

Hi Jan,

Think I have spotted the problem. The timer 4 interrupt is calling the timer 2 macro. Just noticed it by comparing the C code produced by v5 and v6.

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: Timer2 call with Timer2 disabled

Post by Jan Lichtenbelt »

If one looks to long to a problem, one will miss the details.

Thanks a lot for helping. Indeed the wrong interrupt macro has been used for timer4.

Kind regards

Jan

Post Reply