To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.nxt.nxthackingOpen lugnet.robotics.nxt.nxthacking in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / NXT / NXT Firmware Hacking / 35
34  |  36
Subject: 
Re: Faster NXT LCD Screen Refresh
Newsgroups: 
lugnet.robotics.nxt.nxthacking
Date: 
Wed, 4 Apr 2007 17:11:26 GMT
Viewed: 
17322 times
  
In lugnet.robotics.nxt.nxthacking, Dick Swan wrote:
Here's a trick to get a faster rate on the LCD display refresh.

Could you be a little more specific regarding the changes you made to this
method:

UBYTE     DisplayUpdate(UWORD Height,UWORD Width,UBYTE *pImage)
{
  static  UWORD State = 0;
  static  UWORD Line;

  if (State == 0)
  {
    if (DisplayWrite(CMD,(UBYTE*)DisplayInitString,sizeof(DisplayInitString)) ==
TRUE)
    {
      Line = 0;
      State++;
    }
  }
  else
  {
    if ((State & 1))
    {
      if (DisplayWrite(CMD,(UBYTE*)DisplayLineString[Line],3) == TRUE)
      {
        State++;
      }
    }
    else
    {
      if (DisplayWrite(DAT,(UBYTE*)&pImage[Line * Width],ACTUAL_WIDTH) == TRUE)
      {
        State++;
        if (++Line >= (Height / 8))
        {
          State = 0;
        }
      }
    }
  }

  return (State);
}

So far everything I have tried has resulted in garbage on the screen.  The
approach that I thought would work given the original description of the tweak
was along these lines:

    if ((State & 1))
    {
      // always set the address for line zero
      if (DisplayWrite(CMD,(UBYTE*)DisplayLineString[0],3) == TRUE)
        State++;
    }
    else
    {
      if (DisplayWrite(DAT,(UBYTE*)&pImage[0],132*8) == TRUE)
        State = 0;
    }

Thanks in advance for the assistance!

John Hansen



Message has 1 Reply:
  RE: Faster NXT LCD Screen Refresh
 
Change the init message for the LCD display driver to perform wrap around. Offset 12 in the following structure from 0x88 to 0x89. Otherwise it will keep overwriting the same line. Your code snippet doesn't show it, but I'm sure you kept the call (...) (18 years ago, 4-Apr-07, to lugnet.robotics.nxt.nxthacking)

Message is in Reply To:
  Faster NXT LCD Screen Refresh
 
Here's a trick to get a faster rate on the LCD display refresh. It currently takes 16 milliseconds to refresh the NXT LCD. 16 "messages" are sent to the LCD. One message is sent per millisecond. There are two messages from the ARM to the LCD for (...) (18 years ago, 22-Mar-07, to lugnet.robotics.nxt.nxthacking)

8 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR