Lefora Pro Forum
login join
Loading
841 views

Display Area Setup

Page 1
1–3
rookie - member
9 posts

I am working with the S128240C display in 4 - line serial mode.  When I first ran the display my data was rotated 180 degrees, that is, the data read correctly if  rotated so the cable was pointing up.  I have my display board designed with the display cable pointing down.  I experimented with the scan direction and line and column number reversal and managed to get the display turned around.  However I had to give the column addressing an offset of 5 to get the lines to start in the correct column.  Now I have a unusable column on the right-hand side of the display area.  What have I done wrong or missed in the initialization?

I am somewhat disappointed with the contrast of the display.  I have managed, using VOLCTRL, to get a reasonable shade of gray for my characters.  I also adjusted the duty cycle, booster efficiency, bias ratio and oscillator frequency but have not been able to increase the contrast.  What other steps are required to increase the cintrast?

I am attaching schematics, code and a photograph of the display in operation.

Feedback would be appreciated.

Regards,
MLC

Attachment: lcd_example.c (19.0KB)

Attachment: display_panel.pdf (36.0KB)

Admin - admin
81 posts

MLC-
The info below was posted by member martinr with reference to the S128240D which is electrically identical to the S128240C.  This may be helpful.

Improving the contrast on the S128240D.

The code from the Displaytech site is a starting point, but many improvements can be made.
The most important improvement I found was the contrast.
Lets start with the raw code:
 [url]

If you use this with the S128240D, the display contrast may look a bit 'faded' or 'light'.
But this can be improved considerably the use of the 'partial display command' in just three lines of extra code!

Add the command to partially display lines 16 through 143 between ext=0 and display_on at the end of the 'initial' function.

Here is the original end of the 'initial(void)' function:

  wcom(0x30,0); //ext=0
  wcom(0xaf,0); //display on
  delay3(100);
}

Here is the modified end of the 'initial(void)' function: 

  wcom(0x30,0); //ext=0
    ////////////////////
    //start of new lines
  wcom(0xa8,0); //set a partial display...
  wcom(4,1); //...from block 4 (i.e. Starting at line 16)
  wcom(35,1); //...through block 35 (i.e. ending at line 143)
    //end of new lines
    ////////////////////
  wcom(0xaf,0); //display on
  delay3(100);
}

 
So why does this work?
The display has a 'visible' area of 128 lines x 240 columns.
However the controller can drive 160 x 255.
The display lines 0..127 are wired to the controller's lines 16 through 144.
If you use the original code, then the controller is trying to drive lines 0 through 160.
I.e. it tries to drive phantom lines 0..15 and 145..160.
Driving these phantom lines takes power from the controller's charge pump, and decays the voltage, giving a 'faded' appearance.
You still get the full 128 lines of the LCD - they are just mapped to the controllers lines 16..143


Admin - admin
81 posts

MLC-
Please see below from the factory:

- Please have customer to amend their program as below.
wcom(0xca,0); //display control
wcom(0x00,1); //cld=0
wcom(0x23,1); //set duty=1/144
wcom(0x00,1); //set fr value
wcom(0xbc,0); //data scan direction
wcom(0x03,1); //seg254~seg0,com160~com0
wcom(0x01,1); //rgb arrangement
wcom(0x04,1); //32gray scale 3b3p dither mode
wcom(0x15,0); //column address set
wcom(0x05,1); //start column=5
wcom(0x54,1); //end column=84


- On the customer schematic page 2, please have the J2-4 to J2-11 connected to Vdd. In the customer programme, please clear the DDRAM data column0~column84 and line0~line159 before sending Display data to the DDRAM.


Page 1
1–3

Locked Topic


You must be a member to post in this forum

Join Now!