LCDInfo.com

http://www.lcdinfo.com
It is currently Sat Sep 22, 2018 21:19

All times are UTC + 2 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Fri Feb 07, 2003 4:19 
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?


Top
  
 
 Post subject:
PostPosted: Fri Feb 07, 2003 11:22 
Offline

Joined: Sun May 05, 2002 22:05
Posts: 2063
Location: Lappeenranta, Finland
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.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 07, 2003 14:05 
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?


Top
  
 
 Post subject:
PostPosted: Fri Feb 07, 2003 14:07 
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.


Top
  
 
 Post subject:
PostPosted: Fri Feb 07, 2003 19:05 
Offline

Joined: Sun May 05, 2002 22:05
Posts: 2063
Location: Lappeenranta, Finland
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;
 }
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group