Interrupt issues in 18F4550

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Has thanked: 17 times
Been thanked: 7 times

Interrupt issues in 18F4550

Post by electronix »

Hi everybody.

I have been scratching my head past few days regarding interruptroutines in a 18F4550 MCU.
From the beginning the program was rather large and hard to overlook and the problem was that whenever I tried to make an interrupt(anywhwere in the program RB0/INT0) the interrupt macro only fired ones!? and the program just keept on running.

So I decided to make a simple test program, just blink an LED @ 1Hz, and when the Interuppt was triggered (RB0, falling edge) blink the same LED @ 2Hz, but the result was the same again! the interrupt triggered ones and then no more, the LED just keept flashing @ 1Hz.
And when I try to MCLR the MCU just comes to a halt(does nothing at all), the only way to retrigger the interrupt is to do a POR.

I have tried 2 MCUs, different settings in the config menu, different crystals.

So whats next to try? Any suggestions?

Thanx in advance
/Stefan

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: Interrupt issues in 18F4550

Post by Benj »

Hello Stephan,

How are you performing the interrupt? is it using your own C code or is it using the interrupt icon? Could you attach your current Flowcode program to the forums so I can try and see if I can spot what is going wrong for you.

electronix
Posts: 58
Joined: Sat Aug 22, 2009 5:45 pm
Has thanked: 17 times
Been thanked: 7 times

Re: Interrupt issues in 18F4550

Post by electronix »

Hello Ben.

Sure, here it is.
In one of my attempts I was only using Flowcode icons, in another one a C icon, containing a sleep(); instruction.

Best regards
/Stefan
Attachments
sleep_test_18f4550_3.rar
(1.14 KiB) Downloaded 208 times

Post Reply