Subject:
|
RE: Faster NXT LCD Screen Refresh
|
Newsgroups:
|
lugnet.robotics.nxt.nxthacking
|
Date:
|
Wed, 4 Apr 2007 18:12:38 GMT
|
Reply-To:
|
<DICKSWAN@SBCGLOBAL.nomorespamNET>
|
Viewed:
|
17513 times
|
| |
| |
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 that sends this command
string.
This is also the place to change the frame rate from 76 to 95 as was
mentioned in one of the other posts. [Offset 10?]
static const UBYTE DisplayInitString[] =
{
0xEB, // 0 LCD bias setting = 1/9 0xEB
0x2F, // 1 Power control = internal 0x2F
0xA4, // 2 All points not on 0xA4
0xA6, // 3 Not inverse 0xA6
0x40, // 4 Start line = 0 0x40
0x81, // 5 Electronic volume 0x81
0x5A, // 6 -"- 0x5F
0xC4, // 7 LCD mapping 0xC4
0x27, // 8 Set temp comp. 0x27-
0x29, // 9 Panel loading 0x28 0-1
0xA0, // 10 Framerate 0xA0-
0x88, // 11 CA++ 0x88-
0x89, // 12 CA++ 0x88- Column address
will wrap around.
0x23, // 13 Multiplex 1:65 0x23
0xAF // 14 Display on 0xAF
};
-----Original Message-----
From: news-gateway@lugnet.com [mailto:news-gateway@lugnet.com] On Behalf
Of John Hansen
Sent: Wednesday, April 04, 2007 12:11 PM
To: lugnet.robotics.nxt.nxthacking@lugnet.com
Subject: Re: Faster NXT LCD Screen Refresh
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 is in Reply To:
| | Re: Faster NXT LCD Screen 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,(U...itString)) (...) (18 years ago, 4-Apr-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
|
|
|
|