Author Topic: Writing to display is slow  (Read 1784 times)

jrmymllr

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Writing to display is slow
« 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!


Michael_L

  • Administrator
  • Hero Member
  • *****
  • Posts: 356
  • Karma: 33
    • View Profile
Re: Writing to display is slow
« Reply #1 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.

jrmymllr

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Writing to display is slow
« Reply #2 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.

 

Blank Display on NHD‐C0220BiZ‐FS(RGB)‐FBW‐3VM

Started by SteveCBoard Character LCDs

Replies: 3
Views: 4398
Last post May 13, 2014, 12:04:36 AM
by SteveC
NHD‐C12864A1Z‐FSW‐FBW‐HTT display clears after draw

Started by EdAverillBoard Graphic LCDs

Replies: 6
Views: 5470
Last post November 07, 2014, 08:25:20 AM
by Michael_L
NHD‐4.3‐480272EF‐ATXL#‐CTP | FAN5333 | BBB | Nothing on the Display

Started by Alias_AliasBoard TFTs

Replies: 1
Views: 3233
Last post September 25, 2015, 03:09:24 PM
by Paul_B
Arduino LCD library not working with newhaven display NHD‐0420H1Z‐FL‐GWB-3V3

Started by c2hollowBoard Character LCDs

Replies: 9
Views: 8349
Last post July 10, 2014, 08:46:06 AM
by Michael_L
NHD-0420DZW-AG5 - Display "sometimes" shows only 2 lines

Started by stylonurusBoard OLEDs

Replies: 5
Views: 5427
Last post June 18, 2014, 10:09:49 AM
by Michael_L