LCDInfo.com
http://forum.lcdinfo.com/

Nokia 6100 LCD and fast data entry
http://forum.lcdinfo.com/viewtopic.php?f=9&t=1664
Page 1 of 1

Author:  Pyrofer [ Tue Aug 15, 2006 11:37 ]
Post subject:  Nokia 6100 LCD and fast data entry

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?

Author:  Pyrofer [ Wed Aug 16, 2006 17:13 ]
Post subject: 

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?

Author:  J1M [ Sun Aug 20, 2006 17:49 ]
Post subject: 

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

Author:  Pyrofer [ Mon Aug 21, 2006 10:44 ]
Post subject: 

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.

Page 1 of 1 All times are UTC + 2 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/