I'm having trouble using incremental rotary encoders with an LCD display and using the WRITE command together. The first problem was getting the rotary encoders to work well and read out on the LCD. I found that for the LCD screen to display clearly, it needs a small pause each time the screen is cleared and updated. Unfortunately, adding this pause made the encoders not work well. They seem to not want any pause or debounce at all. I found that if I use an interrupt for the LCD display code and have the rotary encoder code in the main code it works great. However, after resolving that and moving on to the next phase, I'm finding that the WRITE statment doesn't work.

I have added DEFINE WRITE_INT 1 and this did not help.

I wrote an alternate version of the code that does not use the interrupt and the READ/WRITE statements works fine, so I think I'm using it correctly....it's just that the encoders don't work very well.

Is there something else I should be doing besides the DEFINE WRITE_INT 1? Is there some trick to getting encoders to work with an LCD without using an interrupt?