Hi,
I would like to re-use display from old MT Ericsson A1018s.. It has nice small graphic LCD of 101x40 px and it is probably driven by PCF 8558.
So I made new sketch, and tried to convert asm code from pages module.ro..
First issue was different i2c address. My display is on 0x38, not 0x70 defined on every page regarding to PCF8558.
Another issue was a control byte - mine is totally different (found by brute force
)..
However I have some results. Display is working but has top and bottom lines doubled as you can see on attached photo.
What I found:
- control byte of B00010001 defines contrast (probably) in second part, and line number in the first part
- B00010001 - select first line (and third - doubled)
- B00110001 - select second line (and fourth - doubled)
- B10010001 - select one line of pixels in the middle of display (horizontaly)
- B00000001 - means lower contrast, B00001001 - higher contrast, B00000101 - totally black lcd..
- this should be inaccurate, I am using higher usable contrast with readable dots so other options are not important for me, but the principle is somehow that
So can somebody help me with annoying mirroring something ?
My opinion is, that display is driven by some other chip, or with two doubled chips with something like i2c port expander on address 0x38.. But I don't know ![]()
code
#include <Wire.h>
#define addr 0x38
void setup()
{
Wire.begin();
Serial.begin(9600);
clean();
}
void clean(){
byte x;
for(x = 0; x < 101;x++ )
{
//delete center line
Wire.beginTransmission(addr);
Wire.write(B10010001);
Wire.write(x);
Wire.write(0x00);
Wire.endTransmission();
//delete upper rows
Wire.beginTransmission(addr);
Wire.write(B00010001);
Wire.write(x);
Wire.write(0x00);
Wire.endTransmission();
//delete lower rows
Wire.beginTransmission(addr);
Wire.write(B00110001);
Wire.write(x);
Wire.write(0x00);
Wire.endTransmission();
}
}
void LCD(int line,int x)
{
Wire.beginTransmission(addr);
Wire.write((line<< 5)+B00010001);
Wire.write(x);//x offset
Wire.write(0x1f); //P
Wire.write(0x05);
Wire.write(0x07);
Wire.write(0x00);
Wire.write(0x1f); //H
Wire.write(0x04);
Wire.write(0x1f);
Wire.write(0x00);
Wire.write(0x1f); //I
Wire.write(0x00);
Wire.write(0x1f); //L
Wire.write(0x10);
Wire.write(0x10);
Wire.write(0x00);
Wire.write(0x1f); //I
Wire.write(0x00);
Wire.write(0x1f); //P
Wire.write(0x05);
Wire.write(0x07);
Wire.write(0x00);
Wire.write(0x12); //S
Wire.write(0x15);
Wire.write(0x09);
Wire.write(0x00);
Wire.endTransmission();
}
void loop()
{
int line,x;
line=1;
x=27;
clean();
LCD(line,x);
delay(10000);
}

