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

problem w/ half of ks0108 display
http://forum.lcdinfo.com/viewtopic.php?f=6&t=128
Page 1 of 1

Author:  eipromb [ Fri Feb 07, 2003 4:19 ]
Post subject:  problem w/ half of ks0108 display

hello, i have a 128x64 ks0108 lcd. and i can get the second half of the display to work, i tried pull-up resistors on the cs1/2 lines, playing with delay settings, playing with bios settings and different parallel cables.

the weird thing is that the display works ocasionally (about 5% of the time) but shows up as garbage.

anyone have any ideas?

Author:  Henri [ Fri Feb 07, 2003 11:22 ]
Post subject: 

So when it's not working it doesn't show anything at all ?
Is the display new or used ?

You could try wiring the CS pins so that the not working half is always enabled and then try writing data to it. Also you could try switching the CS pins. Of course the display parts would be also switched but you might at least see if the second part works.

Author:  eipromb [ Fri Feb 07, 2003 14:05 ]
Post subject: 

The display is new, and was sealed in an antistatic bag when I got it. So I'm not really sure if it could be damaged, (I may pick up another to try out though).

I've already tried swapping the CS1/2 lines and all that happens is, the the data that should show on the second half of the screen shows up on the second half.

Also if I turn the contrast real dark both sides darken, its just that no image is displayed.

Another question, do either the E or D/I pins need to be changed when switching between CS1/2?

Author:  eipromb [ Fri Feb 07, 2003 14:07 ]
Post subject: 

whoops, I meant to say:

I've already tried swapping the CS1/2 lines and all that happens is, that the data that should show on the second half of the screen shows up on the first half.

Author:  Henri [ Fri Feb 07, 2003 19:05 ]
Post subject: 

Strange. I don't know what the problem would be unless something's broken. But if you are occasionally seeing something on the not working side it's even stranger. Maybe there's some contact problem somewhere ?

Quote:
Another question, do either the E or D/I pins need to be changed when switching between CS1/2?

You mean when physically switching the wires or switching in code ? I don't see any reason why they should be changed when physically switching CS pins.

Some code I've been using:
Code:
void cKS0108::WriteCommand(unsigned char Command, unsigned char CS)
{
  Delay(delay);

  SetPortVal(CONTROL, ENABLE_LO | CS | RS_LO, 1);
  SetPortVal(DATA, Command, 1);
  SetPortVal(CONTROL, ENABLE_HI | CS | RS_LO, 1);
  Delay(delay);
  SetPortVal(CONTROL, ENABLE_LO | CS | RS_LO, 1);

  //SetPortVal(DATA, 0, 1);
}

void cKS0108::WriteData(const unsigned char Data[], unsigned int amount)
{
 unsigned char cs;
 unsigned int counter;
 for (counter=0; counter < amount;counter++)
 {
    cs = CurrentColumn>63?CS2:CS1;

    Delay(delay);
    SetPortVal(CONTROL, ENABLE_LO | cs | RS_HI, 1);
    SetPortVal(DATA, Data[counter], 1);
    SetPortVal(CONTROL, ENABLE_HI | cs | RS_HI, 1);
    Delay(delay);
    SetPortVal(CONTROL, ENABLE_LO | cs | RS_HI, 1);

    CurrentColumn++;
    if (CurrentColumn > 127)
       return;
 }
}

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