code for attaching a 2*16 lcd to lpc1769

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by a0105540 on Mon Sep 15 03:31:30 MST 2014
I am trying to attach a 2*16 LCD to my LPC1769 using 4_bit configuration. I found some useful code online and took them as my references to write my own code. However, my friends and i spent three whole days to debug the simple code but nothing happened. I sincerely call for your guys help.

The LCD i use is a rt1602c. I want to display "hello" and "world!" on two separate rows of the screen. But every time i compile, the screen showed "Vellogorld!" or "ello"(row1)&gworld!(row2) or "ello! ello", etc.

The display results are quite random but i can roughly see "hello world!" there. The position is not stable, which shifts with time.

I attached the lcd.c lcd.h and main.c file below. And i also attached a datasheet for the rt1602c. A website is provided as well if you want to know more about the lcd.(http://www.8051projects.net/lcd-interfacing/lcd-4-bit.php)

Original Attachment has been moved to: main_8.c.zip

Original Attachment has been moved to: lcd_0.h.zip

Original Attachment has been moved to: lcd_0.c.zip