Lead

Jun 29 11 8:38 AM

Tags : :

I cannot get the S64240C to work.  No matter what I do, all I can get to show on the display is a checkerboard pattern.  Imagine dividing the display into 4 quadrants.  The top-left and bottom-right quadrants have the pixels turned ON and the bottom-left and top-right quadrants have the pixels turned OFF.

I am using the display in parallel mode and I have it connected exactly as shown in the reference schematic (http://displaytech-us.com/pdf/Schematic/S64240C-testerschematic-061020.pdf), except that I have "C86" tied LOW since I am running in 8080 mode.

I have attached the code for my "initialization", "write command", and "write data" routines.

While I cannot successfully set any of the pixels (I always get the checkerboard), I *can* communicate with the display in some ways.  For example, I can successfully turn the display ON and OFF by sending a command of 0xAF and 0xAE.  Also, if I set the ADC value via the 0xA0 or 0xA1 command, I can successfully read the right value back via the "Status Read" command.  I can also successfully change the display's contrast.

But that's about it.  I cannot set any individual pixels.  I have ripped up and re-wired my connections a couple of times, and I always get the same results.

Finally, I have measured voltages as listed below:

VDD = 3.3v
V0 = 8.74v
V1 = 7.77v
V2 = 6.80v
V3 = 2.00v
V4 = 1.00v
Vout = 12.2v

Does anyone have any ideas?  Is it a power issue?  Does the checkerboard pattern mean something specific?

Thank you in advance for your help.  I'm losing patience over here.  :)


Click here to view the attachment
Quote    Reply   

#1 [url]

Jun 29 11 9:11 AM

One more thing ... I can successfully READ pixel values.  For example, if I write a "1" to a specific pixel location, I can then read it back as a "1", but the LCD still does NOT actually turn that pixel on.  I either get nothing on the LCD at all or the checkerboard pattern.  Argh!!

Here's my write/read code:

  // write some test data, starting at 0,0
  lcd_control(0, 0xB0); // page 0
  lcd_control(0, 0x10); // column 0 (2 bytes)
  lcd_control(0, 0x00);
  lcd_write(0, 0xAA);   // 10101010
  lcd_write(0, 0x55);   // 01010101
  lcd_write(0, 0xAA);   // 10101010
  lcd_write(0, 0x55);   // 01010101
  lcd_write(0, 0xAA);   // 10101010
  lcd_write(0, 0x55);   // 01010101
  lcd_write(0, 0xAA);   // 10101010
  lcd_write(0, 0x55);   // 01010101
 
  // now read it back and output to LEDs
  lcd_control(0, 0xB0); // page 0
  lcd_control(0, 0x10); // column 0 (2 bytes)
  lcd_control(0, 0x00);
  lcd_read(1, 0);
  Delay_ms(2000);
  lcd_read(1, 0);
  Delay_ms(2000);
  lcd_read(1, 0);
  Delay_ms(2000);
  lcd_read(1, 0);
  Delay_ms(2000);
  lcd_read(1, 0);
  Delay_ms(2000);
  lcd_read(1, 0);
  Delay_ms(2000);
  lcd_read(1, 0);
  Delay_ms(2000);
  lcd_read(1, 0);
  Delay_ms(2000);


And this is my "lcd_read()" function:

// function to read status or data from the  LCD
void lcd_read(unsigned short A0_value, unsigned short whichCS)
{
  bits = 0x0017;      // 00010111 = RD low, WR high, A0 low, RESET high, CSS high, CSM high
  if ( whichCS == 0 )
  {
    // whichCS = 0, i.e. MASTER (RB0)
    bits.B0 = 0;
  }
  else
  {
    // whichCS = 1, i.e. SLAVE (RB1)
    bits.B1 = 0;
  }

  if ( A0_value != 0 )
  {
    bits.B3 = 1;
  }

  // read the status
  TRISD = 0xFFFF;  // set PORTD as inputs
  Delay_ms(10);    // let the PORT settle
  PORTB = bits;    // 0001X1XX = RD low, WR high, A0 high/low, RESET high, CSS high/low, CSM high/low
  Delay_us(1);     // slight delay
  PORTF = PORTD;   // output to LEDs
  PORTB = 0x00FF;  // all high (i.e. OFF)
  Delay_ms(10);    // slight delay
  TRISD = 0x0000;  // set PORTD back to outputs
}

Quote    Reply   
Add Reply

Quick Reply

bbcode help