Re: [uCsimm] LCD issues

From: Carl W. Price (carl_price@agilent.com)
Date: Mon May 01 2000 - 17:53:49 EDT


Justin Davies wrote:
>
> Hi,
>
> I'm really new to ucSimm/ucLinux, so be gentle.
>
> I haven't ordered mine yet, but I was wondering, is
> there a list of LCD displays that are compatible with
> the LCD driver on the board ?
> And really, how difficult is it to get the LCD working
> with it ? Do we get output from the system straight
> onto the LCD, or do we have to program that up
> ourselves ?
>
> Also, is there a website that has a list of peoples
> projects so we can get some ideas for our own ?
>
> Thanks,
>
> Justin
>
> __________________________________________________
> Why not just do it... http://www.freedom2surf.net/
> This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/

Hi,

   I just went through this. It is not that hard, I have a 320x240 Seiko
G4 panel
hooked up to mine. The attached c-code is to display a 320x240 4bit
grayscale
image.

--Carl
carl_price@agilent.com

#include <asm/MC68EZ328.h>
#include <stdio.h>

int main (int argc, char *argv[]) {

  char Line_in[80];
  int n;
  int j;
  int i=0;
  unsigned int a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11;
  unsigned char * splash_bits;

  FILE * MyStream;

  splash_bits = (unsigned char *) malloc ( 38400);

  MyStream = fopen (argv[1], "r");

  if (ferror(MyStream)){
     printf ("There is an Error opening the file\n");
     exit;
  }

  for (i=0; i<38400; i = i+12){
     n = fscanf(MyStream, "0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n",
                &a0, &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9, &a10, &a11);
     splash_bits[i] = a0;
     splash_bits[i+1] = a1;
     splash_bits[i+2] = a2;
     splash_bits[i+3] = a3;
     splash_bits[i+4] = a4;
     splash_bits[i+5] = a5;
     splash_bits[i+6] = a6;
     splash_bits[i+7] = a7;
     splash_bits[i+8] = a8;
     splash_bits[i+9] = a9;
     splash_bits[i+10] = a10;
     splash_bits[i+11] = a11;

  }

  LSSA = splash_bits;
  LVPW = 0x50;
  LXMAX = 0x140;
  LYMAX = 0xef;
  LRRA = 0x04;
  LPXCD = 0x02;
  LPICF = 0x0A;
  LPOLCF = 0x00;
  LPOSR = 0x00;
  LACDRC = 0x00;
  //LFRCM = 0x30;
  LCKCON = 0x82;
  PCPDEN = 0xff00;
 
  free (splash_bits);
}

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