Interrupt issues in 18F4550
Posted: Wed Oct 05, 2011 3:33 pm
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
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