Re: [uCsimm] LCD Framebuffer

From: Tom Walsh (tom@cyberiansoftware.com)
Date: Tue Apr 18 2000 - 16:11:06 EDT


"Carl W. Price" wrote:

>
> Thanks for the info. Not putting text to the display really isn't
> that much of a drawback. What I really want is some info on how to
> set the display up, and send bits to it. A HOWTO or sample code would
> be great. I have a number of LCD displays I want to try and bring up,
> some 160x160 others 1/4 VGA. Currently, I don't care much about
> text, but putting a picture of TUX on the display would be great.
>
>

Carl,

    Here are two examples of the setup for the LCDs that I have used so far, one is
the Epson EG9013, the other is the sharp LM32019 (I can send manufacturers PDFs are
available if you need them via private email):

//#ifdef INIT_LCD /* this is the EG9013. */
// movel #splash_bits, LSSA_ADDR /* LCD starting address. */
// moveb #0x28, LVPW_ADDR /* LCD Virtual Page Width Register. */
// movew #0x280, LXMAX_ADDR /* LCD Screen Width Register. */
// movew #0x1df, LYMAX_ADDR /* LCD Screen Height Register. */
// moveb #0, LRRA_ADDR /* LCD refresh rate. */
// moveb #0, LPXCD_ADDR /* LCD Pixel Clock Divider Register. */
// moveb #0x08, LPICF_ADDR /* LCD Panel Interface Config Register. */
// moveb #0x01, LPOLCF_ADDR /* LCD Polarity Configuration Register. */
// moveb #0x81, LCKCON_ADDR /* LCD Clocking Control Register. */
// movew #0xff00, PCPDEN_ADDR /* LCD pins Port C Pull-Down enb. reg */
//#endif

#ifdef INIT_LCD /* This is the LM32019. */
 movel #splash_bits, LSSA_ADDR /* LCD starting address. */
 moveb #0x14, LVPW_ADDR /* LCD Virtual Page Width Register. */
 movew #0x140, LXMAX_ADDR /* LCD Screen Width Register. */
 movew #0xef, LYMAX_ADDR /* LCD Screen Height Register. */
 moveb #0, LRRA_ADDR /* LCD refresh rate. */
 moveb #1, LPXCD_ADDR /* LCD Pixel Clock Divider Register. */
 moveb #0x08, LPICF_ADDR /* LCD Panel Interface Config Register. */
 moveb #0x00, LPOLCF_ADDR /* LCD Polarity Configuration Register. */
 moveb #0x81, LCKCON_ADDR /* LCD Clocking Control Register. */
 movew #0xff00, PCPDEN_ADDR /* LCD pins Port C Pull-Down enb. reg */
#endif

The EG9013 is organized as 640x480 pixels, monochrome, with an 8 bit data bus. In
order to load the data into the display, I used the circuit from RT-Controls to
latch one nibble, delay the clock by one cycle, then when the next nibble is
presented from the MPU, the clock strobes the data into the LCD, ... then the
process repeats.

The LM32019 display is a 320x240 pixels, monochrome, with a 4 bit data bus. NO
interface "foolery" is needed to hook the MPU signals up to the display, everything
is a direct connection. All of the values I used should be self explanatory from
studying the 'EZ328 manual.

Hooking up an LCD to the MPU is really a matter of studying the LCD manufacturer
Data Sheet, then refer to each of the registers I have above and fill in the
appropriate value. You will probably get some flicker on the display, initially, so
you will need to adjust the frame rate with LCKCON & the LPXCD values. To make an
image for the display, use the gimp to make a graphical image with the same size as
the LCD organization, save it as a monochrome XPM file, then run it through a perl
script to convert the values within the XPM file into an assembly language DEFB
format (look at the bootlogo.h file to examine the format).

Keep an eye on my site, 'http://www.openhardware.net/Users/TomW', for some
forthcoming documentation. I have had a number of downloads of the Gerber /
development files and I am spending today writing HOWTO "setup a development
environment". I will also place some docs on the LCDs that I have used with the
68EZ328. Perhaps you will find some information that is usefull in those docs?

Regards,

TomW

--
Tom Walsh - WN3L - Embedded Systems Consultant
'www.openhardware.net', 'www.cyberiansoftware.com'
"Windows? No thanks, I have work to do..."

This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:35 EST