|
In lugnet.robotics.nxt.nxthacking, Ralph Hempel wrote:
> Dick Swan wrote:
> > Here's a trick to get a faster rate on the LCD display refresh.
>
> <snip>
>
> > There's really no additional CPU real-time overhead for the faster
> > refresh. The actual transmission of the screen buffer is done by DMA.
> > RAM memory access is running at 48 MHz, so "stealing"~1000 of these
> > cycles for the DMA every 5 milliseconds is 0.4%. And I didn't read the
> > specs in detail, but it might be as small as 0.1% if the DMA operates
> > on 32-bit words and not 8-bit bytes.
> >
> > The faster screen refresh will be in the next version of RobotC.
> > Individual drawing functions in RobotC (text line draw, fill/erase
> > rectangle, etc) almost all take under 100 microseconds to operate. So
> > it would be easy to experiment with this via a simple RobotC program.
> > You can do a lot of things in 5 milliseconds! If interested in
> > exploring, send me a email and I'll ensure you get early access to the
> > next version.
>
> This is really interesting. If I understand correctly, to get colors,
> or at least shades of grey, you have to refresh the screen quickly
> and the "darker" the pixel, the more often it shows up in the pattern.
>
> For example, let's say I have 3 shades of grey. I'd need 2 copies of
> the screen, and the pixel set routine would figure out which copies to
> set or clear the pixel in to get the desired shade.
>
> For any particular pixel, the apparent grey shade would be proportional
> to the number of times the pixel was on, for example:
>
> off - 0 0
> grey - 0 1
> grey - 1 0
> black - 1 1
>
> For more shades, just add more copies of the display
>
> off - 0 0 0
> grey 1 - 0 0 1
> grey 2 - 0 1 1
> black - 1 1 1
>
> Is that about right?
>
> Ralph
This kind of works. In the first instance, you get two identical shades of
grey.
In the second instance (and I've tried this) you'd be surprised to see that the
difference in shades between the two greys is actually very small. You really
need something like:
white - 0 0 0 0
grey 1 - 0 0 0 1
grey 2 - 0 1 0 1
black - 1 1 1 1
to see any difference. But, at the current rate of screen refresh you get a
noticeable flicker doing a four-frame cycle.
The thing to remember is that this is a passive display. The LCD pixels are set
by a circuit that sweeps across each line and column of the display, giving a
jolt to each pixel. It then relies on a natural delay of the liquid crystal to
revert to its neutral state, so as to maintain the image until the next sweep.
This delay leads to the blurring around moving graphics, as pixels can be set
quite fast, but not cleared any quicker than they naturally fade.
Jason R
|
|
Message is in Reply To:
| | Re: Faster NXT LCD Screen Refresh
|
| (...) <snip> (...) This is really interesting. If I understand correctly, to get colors, or at least shades of grey, you have to refresh the screen quickly and the "darker" the pixel, the more often it shows up in the pattern. For example, let's say (...) (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
|
|
|
|