Are you remembering to SAVE all your registers and pointers BEFORE executing your Interrupt? Are you RESTORING everything back to the way it was BEFORE you leave your interrupt? quote: "My interrupts are pretty fast... and execute in couple of us." Somehow from your statement I don't think you're doing all the required housekeeping.
PICBasic's LCD Routine is in the middle of transferring half a byte (or command) to the LCD when your interrupt pops-up, tears it away from what it's doing, and then returns it an indeterminate time later supposedly to carry on from where it left off. Will the LCD routine still find all the registers EXACTLY the way it EXPECTS to have them? Have you interfered with a critical timing operation? Have you double-checked with the Hitachi Controller manual to see you're not comitting any sins?
Sometimes there are CRITICAL operations that must be completed BEFORE you go and do something else. Go study and understand the LCD code before you blindly go interrupting it. There are rules for interrupts.
Bookmarks