LCD write corrupted by interrupts?
Posted: Thu Jan 28, 2010 11:50 am
This is a funny one.
I'm seeing erratic lcd behaviour (jumping cursor, non-alphabetic characters) after a few minutes of running my program. I'm tracking an encoder with ioc and then start a clock for debouncing. Any of those interrups may occur while writing to the lcd, and I have a hunch that upsets it, but so far no hard evidence as to the cause. It works correctly while simulating. I've cut the program down to just the encoder stuff and the lcd writing.
Interestingly, sometimes it displays random-looking characters or strings, sometimes again displays the log-on message that I display at start-up. It looks as if there is a mix up in a jump or return stack within the lcd routines when interrupted.
Is that a valid possibility? Any tips how I can test that?
thanks,
jan didden
I'm seeing erratic lcd behaviour (jumping cursor, non-alphabetic characters) after a few minutes of running my program. I'm tracking an encoder with ioc and then start a clock for debouncing. Any of those interrups may occur while writing to the lcd, and I have a hunch that upsets it, but so far no hard evidence as to the cause. It works correctly while simulating. I've cut the program down to just the encoder stuff and the lcd writing.
Interestingly, sometimes it displays random-looking characters or strings, sometimes again displays the log-on message that I display at start-up. It looks as if there is a mix up in a jump or return stack within the lcd routines when interrupted.
Is that a valid possibility? Any tips how I can test that?
thanks,
jan didden