Writing to display is slow
I'm using NHD-1.8-128160EF-CTXI-F at 3.3V for everything.
I found the PIC32 example code and adapted it for my micro and can write to the display. The problem is the speed I can write to it. I have to add a lot of delay between driving /WR low and /WR high, on the order of 50uS. Reducing this delay causes the display to simply be inoperable. In looking at the datasheet I see that all timing parameters are well under 1uS. Writing to the entire display takes about 5 seconds, which seems too slow.
The way I'm writing to the display is setting the D/C and data bus lines, then driving /WR low, delay, then drive /WR high. I have also tried driving /WR low, then setting D/C and data lines, etc. but this made little difference.
The signals at the LCD look good on a scope with nice sharp edges. I've used LCDs before and can't fathom what I'm doing wrong!
-
You are correct, that is way too slow! You should be able to fill the display in much under 1 second. Have you verified your delay routine to be the correct amount of time?
What else is going on in these routines (before and after each write)? Also, a tip to increase write speed of the full screen is to drive D/C high only once at the beginning of a screen write, rather than toggling it each byte transfer. This tip is not intended to be the solution to your issues, but just a way to further decrease write times.0 -
I think I have it figured out; getting away from something for awhile tends to clear the mind. Apparently something I didn't notice in the datasheet is that sending a command is very slow. What I had to do is increase the delay before toggling /WR inactive while sending a command, entirely remove the delay when sending data, and boost the micro's clock speed since data can be accepted more rapidly than I thought.
By the way, just a unrelated suggestion. The captcha used for submitting messages is nearly impossible to read sometimes. Even listening to it is scratchy and hard to understand. I had someone else look at it and they're floored too.0
Please sign in to leave a comment.
Comments
2 comments