LCDInfo.com

http://www.lcdinfo.com
It is currently Thu Nov 21, 2024 23:50

All times are UTC + 2 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Aug 15, 2006 11:37 
Offline

Joined: Sun Aug 06, 2006 13:24
Posts: 5
Using a 20Mghz crystal on my Pic I still cant get data into the LCD fast enough. Clearing the screen (18000 pixel writes!) gives a visible redraw, this is not good.

I had the idea of using a FIFO buffer between the PIC and the LCD. The idea is that the pic sends all its drawing commands to the LCD at the best it can manage, then triggers and external clock that clocks all the buffered commands out of the FIFO and into the LCD.

The fifo i picked is this, CY7C4261. Its 32k 9bit wide, that allows for a full screens worth of pixels to be buffered.
This wouldnt speed up the time taken generating the image, but would allow instant display of the image which is much more important. A low framerate isnt as bad as seeing the screed re-draw all the time.
You could clearscreen and draw quite a lot while the LCD was displaying the previous image, then in one quick update the next image appears while the PIC is off working out the next frame. So rather than taking ages to draw, then delay while the image is onscreen, then clearscreen and redraw (this looks ugly, trust me) you get almost a double buffered display.

Anyone else think this is a good idea? Comments?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 16, 2006 17:13 
Offline

Joined: Sun Aug 06, 2006 13:24
Posts: 5
Thinking about this more, you dont even need a fifo buffer....
A problem with the PIC is that you have to divide the clock by 4 to get the actual instruction speed, so a 40Mghz pic is doing instructions at 10Mghz. Add in the fact that the SPI is 9bits and takes at least 1 instruction per bit (probably more like 3) and you divide that 10Mghz down to <1Mghz into the LCD. If you remember that each pixel (for single pixel write) is about 6 bytes, thats quite slow to feed data into the LCD in the end...
So, how to speed it up? How about using parallel? The LCD has no parallel in, but that doesnt mean you cant output parallel from the pic!

If you put the whole data byte on port B, and use a seperate pin for command/data its only a few instructions to put the data on the port and toggle a clock line once. Much less than sending 9 bits in serial around 1/8th the time I should guess. Have some sort of 9bit shift register to take that parallel data and clock it back into the LCD in serial, have a PLL to increase the pics single clock out into 9 clock cycles for the LCD and you now have an 8 times increase in speed sending data to the LCD.

There exists parallel in - serial out fifo buffers, so you could combine both these methods to feed the data into the fifo quickly with less bit banging, then have the fifo pipe it out in serial to the LCD for full speed display with no visible redraw.

Comments this time?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 20, 2006 17:49 
Offline

Joined: Wed Jan 12, 2005 23:27
Posts: 20
have you check this page?
http://thomaspfeifer.net/nokia_6100_display_en.htm

Doesn´t seem to be very slow processing images, and graphics... I think that with a optimized rutine a 40Mhz PIC could draw without problems at 5fps aprox.

regards

_________________
Si puede pensarse, puede hacerse


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 21, 2006 10:44 
Offline

Joined: Sun Aug 06, 2006 13:24
Posts: 5
Yes, thats very smooth! I have emailed him for help.

The problem is that the pic pushes the data out via serial at a set rate. I cannot optimise the serial output routine at all. I get a visible redraw onscreen, that is not good.
Even the clearscreen command, which only has to repeatedly output the same 9bit data 18000 times is slow, you see the display clear from top to bottom. Without speeding up this serial output from the pic, optimising my code will make no difference.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 66 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group