LCD.refresh() question

Post your NXJ projects, project ideas, etc here!

Moderators: 99jonathan, roger, imaqine

LCD.refresh() question

Postby imaginedvl » Wed Sep 16, 2009 12:01 am

Hi,

I have a question regarding the LCD.refresh() method.
Does anyone knows if the "refresh" method is waiting for the screen to be refreshed complety because to return? (like a vertical sync on PC for instance). Or it is safe to call it a LOT of time within the code without slowing down the program?

By the way, guys I'm really happy about all the work you did on the LCD side. At first, I was using RobotC just because of that (the execution speed in general is really fine with Lejos and the only thing that was kinda slow for me was the LCD part). Now it is perfect and I was able to port everything within Lejos environment (I'm using the LCD extensively). Very good job!
imaginedvl
New User
 
Posts: 4
Joined: Sat Mar 01, 2008 3:54 am

Postby lawrie » Fri Sep 25, 2009 9:17 pm

You don't need to call LCD.refresh() at all as it is done automatically on a timer in the firmware. However, you can LCD.setAutoRefresh(false) and just call LCD.refresh when toy want to write to the LCD. If you do it that way, I believe the refresh immediately writes the buffer in the firmware to the LCD screen, but Andy is more of an expert on this than me.
lawrie
leJOS Team Member
 
Posts: 918
Joined: Mon Feb 05, 2007 1:27 pm

Postby gloomyandy » Sat Sep 26, 2009 1:03 am

Hi,
The screen is automatically refreshed (using DMA), every 250ms. If you turn off auto refresh then you can trigger the start of a screen refresh (it does not wait for the refresh to complete), if a refresh is already in progress then the refresh call is ignored, it does not start the screen refresh again from the beginning. I seem to remember that it takes around 4ms to send the screen data, but I may have that wrong!

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3964
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK


Return to NXJ Projects

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff