Maker Pro
Maker Pro

Stuck with LCD Display and Black Blocks

leeb_965

Feb 5, 2012
34
Joined
Feb 5, 2012
Messages
34
I have been trying to get this LCD Display to work but I get a row of Black squares when I power it up. I have followed http://iamsuhasm.wordpress.com/tutsproj/using-lcds/

I havnt used the switches for the enable or data inputs I have just directy wired D7-4 to GND and D3-0 to +5VDC to the LCD to initialize it. Apparently the blocks are because of the contrast setting but I have tried values from 50 ohms (very high contrast) to 1000 Ohms (Very faint contrast) and nothing happens. Im expecting a block to the far left to blink on and off.

Also I think the LED Backlight doesnt work. I have tried using a 100 ohm resistor between the +5VDC line and the +backlight pin but nothing seems to happen, just the blocks.

Can anyone suggest and ideas why this is happening and what I can do to fix it?
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Just putting the data on the D lines does not initialize the LCD. You have to set all of the three control pins as follows:

RS - connected to ground to send a command.
RW - connected to ground to write
E - must be strobed to issue the command (i.e. low to high then low again).

If you are getting blocks across the screen, the LCD has not been initialized.

Bob
 

leeb_965

Feb 5, 2012
34
Joined
Feb 5, 2012
Messages
34
I tried it with an arduino using the code:

#include <LiquidCrystal.h>
// Initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // Create an lcd object and assign the pins
void setup() {
lcd.begin(16, 2); // Set the display to 16 columns and 2 rows
}
void loop() {
// Run the seven demo routines
basicPrintDemo();
}
void basicPrintDemo() {
lcd.clear(); // Clear the display
lcd.print("Basic Print"); // Print some text
delay(2000);
}

Enable and RS are connected to the arduino input ports and RW to ground.
But the same Black Blocks are there.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
When I have used LCDs, the init sequence was much more complicated than one command, but that might be due to using the 4-bit instead of 8-bit interface.

If i recall, you also have to wait a good long time after powering up before issuing a command, something like 10ms.

Bob
 
Top