Newhaven Display Forum

Newhaven Products => TFTs => Topic started by: jrmymllr on April 27, 2015, 09:55:36 AM

Title: Writing to display is slow
Post by: jrmymllr on April 27, 2015, 09:55:36 AM
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!

Title: Re: Writing to display is slow
Post by: Michael_L on May 04, 2015, 12:58:21 PM
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.
Title: Re: Writing to display is slow
Post by: jrmymllr on May 08, 2015, 02:58:48 PM
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.