Page 1 of 1

Interupts going mad with 18F46K22

Posted: Thu Apr 15, 2021 6:17 pm
by anzacinexile
Hi team
Further to my ongoing investigations with the timer
viewtopic.php?f=76&t=22661[url]
I've hit another funny.
Same program, but now I've hooked up 4D Systems displays using UART channel 1 and UART channel2 instead of the 4x20 LCD.
When running the program without using Channel 1 alls well but if I enable channel 1 the interrupts cease to work. Changing channel 2 has no effect so either I'm going mad or UART Channel 1 (Port C6 and C7) is upsetting the interrupts somehow.
I've swapped the displays around but the issue follows the port, not the display.
Any ideas would be greatly appreciated
Thanks
Chris

Re: Interupts going mad with 18F46K22

Posted: Thu Apr 15, 2021 6:44 pm
by Bachman
Maybe there is a bug in the UART1 interrupt macro. To test it, create a new and small program.

For example, Timer1 interrupt flashing an LED on port RA0. If it's working, step forward. Timer1 and UART1 interrupt and test it again in real HW.

Re: Interupts going mad with 18F46K22

Posted: Thu Apr 15, 2021 6:52 pm
by anzacinexile
Thanks Bachman but that's how I diagnosed the problem. I didn't explain how I'm fault finding in the interest of keeping the post as short as possible.
I'm not even trying to do anything on channel 1, simply initialising the port is enough to cause the interupts to fail
Thanks for replying
Chris

Re: Interupts going mad with 18F46K22

Posted: Sun Apr 18, 2021 3:57 pm
by anzacinexile
Have done a bit more investigation but got nowhere I'm afraid.
In case it was the VISI object causing the problem I substituted the VISI object with the UART object but the behaviour was the same, a simple initialize was enough to make the interrupts misbehave.
Any clues great fully appreciated
Thanks
Chris