LCD Contrast adjustment

Mart

New member
Hi,

I am using a seeduino MEGA (arduino-like) device to control a LCD (https://www.crystalfontz.com/product/CFAH4002ATFHJT.html).

If I ground the contrast pin, I see some output on the LCD as expected. I am trying to use an analog pin to control the contrast. Whatever value i put in the analogWrite, the LCD always stay blank. Is it something doable or I have to absolutely use a POT to control constrast?

pseudo-code:
Code:
#define LCD_CONTRAST_PIN 5
LCDInit();
pinMode(LCD_CONTRAST_PIN, OUTPUT);
analogWrite(LCD_CONTRAST_PIN, 10);
thanx

Mart
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

CF Tech

Administrator
Can you do a quick test for me?

Write the lowest value to the pin. Measure it with a DMM. What is that value?

Write the highest value to the pin. Measure it with a DMM. What is that value?
 

Mart

New member
I dont have access to the setup right now.

I am using a function called analogWrite:

http://www.arduino.cc/en/Reference/AnalogWrite

Calling analogWrite() on any other pins will give high (5 volts) for values greater than 128 and low (0 volts) for values less than 128.

Mart

Can you do a quick test for me?

Write the lowest value to the pin. Measure it with a DMM. What is that value?

Write the highest value to the pin. Measure it with a DMM. What is that value?
 

noise

New member
Nearly the same problem

I have nearly the same problem but with an older 634 v.1.2. I have JB closed to invert the serial data. VSS to ground and VDD to +5 on the Arduino. Data IN to TX (pin 1) on the Arduino. DIPs set for 9600baud.

As such, I get no output on the display, but if I connect the LED+ to +5V I get both the LED lit and my data written to the display correctly. Is there a way around that? I'd like to not have the current draw for the backlight on all the time, but any other lower PWM output to the LED+ gives me no data.

Hopefully I'm making sense, thanks in advance for any help.
 

CF Tech

Administrator
noise:

I do not know why LED+ would conflict with Vdd. They should be independent.

Try this:

* Use a bench supply to power up the module (LED+ and Vdd)

* Send the command to set the backlight to 0%

* send the command to save the current state to the saved boot state

* send to the command to boot to the saved boot state

Now when it wakes up (with LED+ and Vdd) the backlight will still be off, so no current.
 

noise

New member
Thanks for the quick reply. Unfortunately that doesn't seem possible. I have the 634 1.2 revision (http://www.crystalfontz.com/products/634v1.0/) and it seems the ability to store settings was added in 2.0 (http://www.crystalfontz.com/product/CFA634NFAKS.html).

I did try to power both LED+ and Vdd, and set the backlight using \014\000, but doing so with any value for the backlight seems to confuse the display and not affect the backlight level.

I'm also confused by the docs that say:

"To use the backlight, connect a regulated 5v supply capable of sourcing 600mA to the LED+ terminal. This may be the same supply that is used for Vdd. The backlight brightness is controlled by PWM (Pulse Width Modula- tion). The PWM may cause noise on supplies that have high output impedance. If this noise causes problems in your application, you may want to connect a filter capacitor from Vdd to Vss close to the display, or operate the backlight at full brightness, which disables the PWM."

But then offer the serial command to set the backlight level.

Any other ideas?
 

CF Tech

Administrator
If the module has not been modified, the "A" terminal of the backlight should be the only thing that connects to the LED+ pin.

If things are "right" with the module, the module should work fine with no connection to LED+

All I can think of is that some change has been made to the module or it is damaged or something.

Is there any connection visible between Vdd and LED+ ?
 
Top