Author Topic: software controlled contrast is not consistent  (Read 4509 times)


  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
software controlled contrast is not consistent
« on: September 10, 2015, 08:23:22 AM »
We have the NHD-C0216CIZ-FSW-FBW-3V3 in an application.  We have built over 500 units. 
The contrast on a small percentage of the 500 units is very dark. 

The contrast is controlled via software in the initialization.  Each unit has the same code, so it sends the same contrast value.  So then why are some units much darker than most? 

Is the contrast dependent on any hardware (external to the COG/LCD module) differences/tolerances?  (I ask this because we have tried replacing the LCD module on a bad unit and the contrast problem persists- suggesting the fault is not with the LCD module.  But we've only done this once, so it's not conclusive.)

FYI, here's my init code:
Code: [Select]
const char LCD16_initString1[] = {
0x38,  // function
0x39,  // function
0x14,  // Internalosc,
0x78,  // Contrast,
0x56,  // Powercontrol,
0x6D,  // Followercontrol, 

const char LCD16_initString2[] = {
0x0C,  // Displayon,
0x06  // Entrymode, 

void LCD_init(void){
    Cpu_Delay100US( 400);
    Cpu_Delay100US( 400);
    Cpu_Delay100US( 400);


  • Administrator
  • Hero Member
  • *****
  • Posts: 384
  • Karma: 10
    • View Profile
Re: software controlled contrast is not consistent
« Reply #1 on: September 10, 2015, 12:31:38 PM »

The hardware will play a role in the contrast. The 2 capacitors are part of a booster circuit that steps up the voltage required to create the contrast.

I was wondering how big of a difference you are seeing in the contrast? If possible to take a picture comparing 2 displays.

Also are there any differences between the boards on which the displays look a little bit darker? (Voltage, Resistance, or capacitance)


  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: software controlled contrast is not consistent
« Reply #2 on: September 10, 2015, 02:17:08 PM »
Thanks for the reply.
The contrast difference is quite large, and the darker one is unreadable at some angles.  Attached a photo showing a good and bad unit side-by-side. 

I measured the voltages on all 8 pins.  There is no voltage difference above ~8mV between the two samples.

1.  3.01V
2.  3.01V
3.  3.01V
4.  0 (gnd)
5.  3.01V
6.  5.86V
7.  4.43V
8.  1.51V

Any other ideas?

[attachment deleted by admin]


NHD‐C0220AA‐FSW‐FTW Contrast

Started by mhathawayBoard Character LCDs

Replies: 1
Views: 4676
Last post March 03, 2015, 11:53:43 AM
by Retheesh_M
Adjusting NHD‐C0220BiZ‐FSW‐FBW‐3V3M contrast

Started by OBergeronBoard Character LCDs

Replies: 1
Views: 4864
Last post April 25, 2016, 03:38:21 PM
by Saurabh_B
NHD‐0216HZ‐FL‐YBW‐C adjusting contrast with manufacturer disabled pin

Started by 8510LeoBoard Character LCDs

Replies: 3
Views: 5419
Last post February 27, 2016, 09:13:09 AM
by 8510Leo
Contrast supply for NHD‐24064WG‐ATFH‐VZ#

Started by Shaun_CarawayBoard Graphic LCDs

Replies: 2
Views: 7857
Last post May 19, 2014, 10:01:31 AM
by Shaun_Caraway
NHD‐0420CW‐AG3 Contrast question

Started by RichardRBoard OLEDs

Replies: 2
Views: 6861
Last post January 16, 2016, 09:52:02 AM
by RichardR