NXT Grayscale Screen?

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
nxtboyiii
Posts: 366
Joined: 02 Oct 2010, 07:08
Location: Everywhere

NXT Grayscale Screen?

Post by nxtboyiii »

Hi,
Does anyone know how to make the nxt screen look grayscale?
Like for a splash screen for a game?
Could someone make a sample program of greyscale?

Thanks, and have a nice day,
nxtboy III
Thanks, and have a nice day,
nxtboy III

programnxt.com
timpattinson
Posts: 224
Joined: 30 Oct 2010, 04:10
Location: 127.0.0.1
Contact:

Re: NXT Grayscale Screen?

Post by timpattinson »

hi, The NXT screen is black and white... no grayscale unless you flash a pixel on and off many times a second... But the refresh rate for the screen is 10hz (10 times a second so that probably wouldn't look so good) (It would flicker)
In NXC you can change the contrast of the whole screen, but not individual pixels
-Tim
Commit to Lego Mindstorms StackExchange Q&A http://area51.stackexchange.com/proposals/4105
Minboards IRC Channel #mindboards on Freenode
My blog: http://timpattinson.wordpress.com/
muntoo
Posts: 834
Joined: 01 Oct 2010, 02:54
Location: Your Worst Nightmare
Contact:

Re: NXT Grayscale Screen?

Post by muntoo »

timpattinson wrote:hi, The NXT screen is black and white... no grayscale unless you flash a pixel on and off many times a second... But the refresh rate for the screen is 10hz (10 times a second so that probably wouldn't look so good) (It would flicker)
In NXC you can change the contrast of the whole screen, but not individual pixels
-Tim
Theoretically, it would require 24Hz * for a "smooth" blend, and a higher frequency if you want different shades of gray with the same "smoothness".

* 24Hz == 2 * 12Hz. 12Hz is sort of your eyes' capture rate.
Image

Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE


Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
nxtboyiii
Posts: 366
Joined: 02 Oct 2010, 07:08
Location: Everywhere

Re: NXT Grayscale Screen?

Post by nxtboyiii »

I already know that you can only choose black or white, but I need a program for it that still looks ok. Like an actual picrure of something that "looks" gray.
The TI-84 calculator has only black and white, yet many grayscale pictures have been made using a flickering method.
Thanks, and have a nice day,
nxtboy III

programnxt.com
muntoo
Posts: 834
Joined: 01 Oct 2010, 02:54
Location: Your Worst Nightmare
Contact:

Re: NXT Grayscale Screen?

Post by muntoo »

nxtboyiii wrote:The TI-84 calculator has only black and white, yet many grayscale pictures have been made using a flickering method.
That's probably because the hardware supports such high flickering speeds.

-----

Try this:

Code: Select all

#define TIME_BEFORE_INCREASE 100
#define INCREASE_BY 1

task main()
{
    for(unsigned long waitTime = 0; 1; waitTime += INCREASE_BY)
    {
        for(unsigned long timer = CurrentTick(); (timer + TIME_BEFORE_INCREASE) > CurrentTick(); )
        {
            ClearScreen();
            RectOut(0, 0, 8, 8, DRAW_OPT_FILL_SHAPE);
        }
    }
}
Image

Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE


Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: NXT Grayscale Screen?

Post by mightor »

The NXT's screen is limited by hardware to about a 10Hz refresh rate. So flicker all you want, you won't see anything but a horrible shearing effect. If this is what you're after then by all means :)

- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: NXT Grayscale Screen?

Post by mattallen37 »

I was just wondering the other day, if it is possible to speed up the refresh rate (for those who want to have grayscale). I think Nicolas increased the motor control update rate from 10Hz to 100Hz, so I wonder if the screen could also be updated that often (or if it already is, when using his FW). Is it totally a hardware set speed? I wouldn't assume so, 10Hz max speed based on hardware seems incredibly slow, for almost anything that is just handling signals. I would assume it is a software limitation (Firmware), and that is why I wonder if it could be increased (or already has been, by Nicolas). Just an idea I had the other day.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: NXT Grayscale Screen?

Post by mightor »

It's the controller for the screen that's the limiting factor, not the firmware.

- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: NXT Grayscale Screen?

Post by mattallen37 »

Ok, I just thought that maybe the ARM just only updates the ATMEGA48 I2C registers 10 times a second. Nicolas somehow got the motor control update speed up to, I think 100Hz, and isn't the ATMEGA what controls the motors? I just wondered if the screen update speed was the same issue, and could be increased by faster/more frequent I2C updates.

Edit: So, you are saying that it is the ATMEGA48 that has the limit of 10Hz, and I was curious to know if perhaps 10Hz was the speed that the ARM updated the ATMEGA.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: NXT Grayscale Screen?

Post by mightor »

No, the screen is not controlled by by the Atmega, it's connected to the ARM with SPI. Take a look below, this is from the schematics PDF from the HDK.

Image

Hope that clarifies it.

- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 2 guests