modification of KS108 lcd lib

10 Apr 2012

I would like to use à KS108 compatible LCD on my board but the LCD only works at 5V. I would like to use an I2C IO expander (PCF8574) for the databus like that:

/media/uploads/GuiTwo/archi.jpg

But I have some probleme with the library

Just a warning in the compilator "members and base-classes will be initialized in declaration order, not in member initialisation list order" in file "/KS0108.cpp", Line: 16, Col: 4""

and the mbed freeze...

KS0108.cpp

KS0108::KS0108 (PinName _DI, PinName _RW, PinName _E, PinName _CS2, PinName _CS1,PCF8574 _DB)
    :
    DI(_DI), 
    RW(_RW), 
    E(_E), 
    CS2(_CS2), 
    CS1(_CS1), 
    DB(_DB) I think I need something here
    {
    

   //RST.mode(OpenDrain);
   DI.mode(OpenDrain);
   RW.mode(OpenDrain);
   E.mode(OpenDrain);
   CS2.mode(OpenDrain);
   CS1.mode(OpenDrain);
  
   

KS108.h  
  
private:
    //BusInOut DB;
    PCF8574 DB;
    // DigitalInOut RST; // hardware reset
    PinName SDA;
    PinName SCL;
    
    DigitalInOut DI;
    DigitalInOut RW;
    DigitalInOut E;
    DigitalInOut CS2;
    DigitalInOut CS1;

Sources files /media/uploads/GuiTwo/lcd-pcf.zip

14 Apr 2012

Nobody can help me ?

14 Apr 2012

Guillaume Fricker,

It,s very difficult to help, with so little information. Try helping yourself by adding debug print statements in main and see where things stop responding, you may then find that you can track down the problem and fix it yourself, or post again with more information.

15 Apr 2012

Checkout my example of an i2c based databus and addressbus on http://mbed.org/users/wim/notebook/mbed-addressbus-databus-and-controlbus/#

The solution that I chose is to define a new class for an i2c based 8 bit databus. That class is instantiated and then used as parameter in the declaration of your ks0108.

16 Apr 2012

To David Fletcher

I can't give you more detail mbed bug and freezz during initialisation of KS108... But thank's

To Wim Huiskamp

I think that with you example I will I have find the probleme I will try after... thank you

08 Jul 2012

Hello All,

I have buyed one Raystar RG12864B-BIW-V with NT7108 chip instead of KS0108B. I have tried the program "DisplayTest" but without any success. Looking in the code of KS0108.cpp I have found in KS0108::SelectSide that the CS1 and CS2 has wrong values. I have change all "1" in "0" and all "0" in "1" there. And everything works now!