HD44780 LCD and initialising

Thread Starter

hunterage2000

Joined May 2, 2010
487
Does anyone have the assembly code to initialise an HD44780 LCD? I tried using it with an arduino and some code but it didnt work and only showed a row of black squares. Apparently I need to initialise the LCD to get rid of these and get it working. The datasheet shows how to intialise it with a 8051 Microprocessor only.
 

MrChips

Joined Oct 2, 2009
24,611
Surely the arduino library and user base already have this covered.
Are you using it in 4-bit or 8-bit interface mode?
 

Thread Starter

hunterage2000

Joined May 2, 2010
487
Im not sure but there is a header file called LiquidCrystal.h. I used a basic example from the examples file.

Rich (BB code):
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("hello, world!");
}

void loop() {
  // Turn off the cursor:
  lcd.noCursor();
  delay(500);
   // Turn on the cursor:
  lcd.cursor();
  delay(500);
}
This is a 4-bit mode example
 

takao21203

Joined Apr 28, 2012
3,702
They can be a bit finicky to be put to working order. When you have done it 10 or twenty times, this will no longer be a problem.

The interface was designed in the early 1980s and set into stone- became a worldwide standard.

Nowadays if designed freshly, they'd have a foolproof serial interface with a default mode, and no crashing possible (or at least not so easily).

They are very likely mask programmed, not using a program FLASH.
 
Top