Jump to content

KS0108-LCD problem


mono
 Share

Recommended Posts

im trying to connect a ks0108-display to the lpc17-core. datasheet can be found here:

 

http://www.topwaydisplay.com/Pub/Manual/LM12864MBC-Manual-Rev0.1.pdf

 

have connected cs1 to j28-sda, cs2 to j28-sc and reset to +5v. have uploaded the ks0108-test from mios32_test/app_lcd. after rebooting the lpc the led on the board fades twices and then it just flashes. the lcd itself shows only random rubbish. first on the right side and then on the left. no data at all and no changes within the "rubbish" either. the testlcdpin command from the bootloader works fine! all pins are connected right. the only thing i noticed is that the voltage is about 3.1v instead of 3.3v on the control pins. the data lines work with 5v as expected.

 

where could be the problem ? have used the display on a pic32 before and it worked fine. dont know how i get this to run on the lpc17. any help appreciated....

 

thx.

 

 

Link to comment
Share on other sites

Hi,

 

after rebooting the lpc the led on the board fades twices and then it just flashes.

 

this is normal - in this application the LED will flash whenever the LCD will show a new picture.

 

 

the lcd itself shows only random rubbish. first on the right side and then on the left.

 

Does this also happen when the lcd_type 0x82 (==GLCD_KS0108_INVCS) is selected?

 

 

the only thing i noticed is that the voltage is about 3.1v instead of 3.3v on the control pins.

 

Your datasheet specifies that VIH should be 3.5V minimum, so that 3.1V could be problematic (but I'm unsure).

Do you have access to an additional 74HCT541 (or similar level shifter) to pull this signal to 5V?

 

Best Regards, Thorsten.

Link to comment
Share on other sites

nice to know that the flashing is normal. unfortunately i have no access to level-shifters like u mentioned. maybe i can figure something out with an uln2803...

 

have tried both ks0108-lcd-type (0x81/0x82). no success. i think u r right with the 3.5v. but i have used the display before on a pic32, running @3.3v! worked fine there.

will meassure the voltage on the pic32 tomorrow again to confirm if thats the issue...

 

thx.

 



...just tried lcd_type 0x82 (GLCD_KS0108_INVCS) and the on-board-led does not flash! i wonder why that is...

 

Link to comment
Share on other sites

You could doublecheck if the CS voltage is the problem with following configuration (has to be done with the bootloader update app):

set lcd_type 0x81
set lcd_width 64

So that the non-inverted CS option is selected, and only the first half of the KS0108 LCD is accessed.

 

Now tie CS1 to 5V - do you see a "valid" picture?

 

Best Regards, Thorsten.

Link to comment
Share on other sites

You are sure that the data lines are connected correctly?

 

What happens if you replace the code in APP_Background by:

void APP_Background(void)
{
  MIOS32_LCD_GCursorSet(0, 0);
  MIOS32_LCD_Data(0x01);
  MIOS32_LCD_Data(0x02);
  MIOS32_LCD_Data(0x04);
  MIOS32_LCD_Data(0x08);
  MIOS32_LCD_Data(0x10);
  MIOS32_LCD_Data(0x20);
  MIOS32_LCD_Data(0x40);
  MIOS32_LCD_Data(0x80);

  while( 1 ); // wait endless
}

I expect that you will see some kind of backslash at the upper left corner of the GLCD

 

Best Regards, Thorsten.

Link to comment
Share on other sites

...same "rubbish" on both screen-halves. the only difference is that the led stopped flashing.

 

cs cant be @5v according to the datasheet. it needs to toggle with the r/w change. will give up for today. i try the level-shifter somehow tomorrow and let u know how it looks like. thanks a lot so far!

 

kind regards,

mOnO

 

Link to comment
Share on other sites

CS doesn't need to be toggled, the datasheet only shows a simple access example.

 

So: I bet that one or more connections are wrong, especially because KS0108 type displays are usually very easy to handle (there are no error prone configuration sequences).

 

Best Regards, Thorsten.

Link to comment
Share on other sites

morning.

 

good news! after reading your answer i  measured the pins with testlcdpin again and voila had a short between the enable pin and db1. working fine now! cs1 & cs2 still need to be swapped for some reason, but apart from that im happy! can now start adding a few more interfaces (midi/i2c) and than i will dive into mios32 programming...:-)

 

kind regards,

mOnO

 

 

 

Link to comment
Share on other sites

...have swapped cs1&cs2 and attached a photo of my lpc17-core. just for completing the topic. and yes, i know there is not even a voltage regulator! its my very first prototype. it has only two modified j15-connectors for two ks0108-displays. 5v are from usb and 3.3v are from the lpc-link-board. have received my 3.3v-regulators and will add them to the board. i2c and midi as well later...

 

kind regards,

mOnO

 

post-20416-0-14695400-1383401699_thumb.j

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...