Hello guys;
I'm trying to display some text on a monochrome LCD (16x2). When I run the code, it has a strange effect like the rows of pixels are taking turns being lit up or not. Sorry I cant share how it looks like. Does anyone have any idea whats happening? Thanks so much!
Without seeing an actual picture of the issue on the LCD, my initial guess would be contrast adjustment. What does the datasheet for the LCD module say about contrast adjustment? There's usually a pin that you connect to an external variable resistor so you can vary the contrast by hand.
I don't know what the new rules are for the new Forum software.
It seems crazy to put upload restrictions onto new users. (However it would be sensible to allow someone who has read the Forum guidelines)
It would be even more sensible if you could find the new Forum "rules".
The old software had a sticky message in every Forum that showed you how to ask questions, get the best answers, ...
This general advice is still here but nowhere does it say "upload restrictions"
The resistors would have to be less than 50 Ohms in total (and the capacitors rather large), being the minimum contrast resistor value (and the approximate value of the Arduino output internal resistance when you set "Contrast" to zero) but then the Arduino output cannot safely drive them. It is a paradox.
You would use PWM as a charge pump to a Capacitor.
The VO pin has an effective impedance of about 10k.
The +ve pulses will "pump". The -ve pulses will discharge the Capacitor.
I would definitely have a series resistor from the PWM pin e.g. 5k0 giving an effective 3k3 impedance.
Untested. It seems a pointless exercise. Especially when you have to use an external series R and external C.
Perhaps I might calculate some real values and try it with real components. 3k3 with 1uF = RC = 3.3ms. Which sounds acceptable with a 10kHz PWM (period 0.1ms).
All the same. One resistor is easier, cheaper and safer. And is what HD44780 was designed for.
Modern TFT, OLED, ... controllers generate all their voltages on-chip. But they use higher frequencies and require smaller pump capacitors.
It does indeed - but you require a resistance of less than 100 Ohms to pull it down to less than 0.1 V as you need to have adequate range of adjustment . Anything higher, it simply cannot pull it down to that level.
Even worse! The positive pulses are working against getting the voltage down to the necessary level and they are 20 times more effective in pulling the voltage up.
You would actually need a buffer amplifier to make it work.
I don't follow your argument. However it is my bedtime.
I will try it tomorrow.
Most 16x2 LCDs require about -4.5V relative to the VCC pin.
To cater for different units you might use a range of -4.0V to -5.0V relative to VCC pin. e.g. 1.0V to 0.0V relative to GND on a VCC=5V system.
If you run on a VCC=3.3V system, a simple resistor to GND does not work. You need a negative supply or a negative charge pump driven by PWM.
[sujenvonmusk]
I think your'e lost in the contrast discussion. Use a resistor to gnd as mentioned.
You started saying an LCD 16x2, but you defined lcd.begin(20, 4); in your sketch???
Try the 'hello world' example in the developement tool.