Pages: [1]   Go Down
Author Topic: LCD I2C Displaying Weird Characters.  (Read 2216 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am trying to interface my Uno R3 board to this LCD

http://media.nkcelectronics.com/datasheet/LCM1602K3-NSW-BBW.pdf

Using the Example in the Liquid Crystal I2C Library "Hello World" all i get is a bunch of meaningless characters on the screen.
I have checked that the correct pins are connected and that R2 jumper is soldered for I2C comm.

Is their something i am missing ? ? ?

Thanks smiley

Code:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x19,16,2);  // set the LCD address to 0x19 for a 16 chars and 2 line display

void setup()
{
  lcd.init();                      // initialize the lcd
 
  // Print a message to the LCD.
  lcd.backlight();
  lcd.print("Hello, world!");
}

void loop()
{
}
« Last Edit: May 02, 2012, 01:56:10 am by pasta1234 » Logged

Málaga, Spain
Offline Offline
Edison Member
*
Karma: 41
Posts: 2182
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That library will not support that LCD, if you look at the datasheet it seams to have a custom driver that is not hitachi driver compliant.
Two options:
1. Write your own library to drive the LCD
2. Google one and see if someone has already writen one.
Logged

   

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 4393
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
That library will not support that LCD, if you look at the datasheet it seams to have a custom driver that is not hitachi driver compliant.

Not exactly - but the result is the same.  According to the datasheet the board uses a Sunplus SPLC780D controller which, as far as I can tell, is indeed compatible with the HD44780 instruction set.  BUT - there is also a PIC16F690 that is converting the serial input information into commands for the controller chip.  So the library will not support that LCD because that particular PIC interface is not supported by the Liquid Crystal I2C Library.

Don
Logged

Málaga, Spain
Offline Offline
Edison Member
*
Karma: 41
Posts: 2182
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

More than driver, I should have said interface to the LCD. Thanks for the clarification there Don.
Logged

   

Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What about the library listed on this page for New Haven (LCDi2cNHD) Displays, it seems they also use the PIC 16F690 Interface ?

http://arduino.cc/playground/Code/LCDi2c

Pete
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 4393
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What about the library listed on this page for New Haven (LCDi2cNHD) Displays, it seems they also use the PIC 16F690 Interface ?

That's a (very slim) possibility.  The PIC 16F690 is nothing more than a garden variety microprocessor, not unlike the ATmega328 in your Arduino.  It can be programmed to interface the LCD display with any variety of serial communication protocols.  If the commands for the New Haven serial interface happen to match match the commands for your serial interface (not likely) then the library may work.

Don
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Considering that, what are my other options for using this LCD using the fewest possible wires ?

Pete
Logged

Málaga, Spain
Offline Offline
Edison Member
*
Karma: 41
Posts: 2182
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The newhaven display - LCDi2cNHD will most likely work. Looking at the data sheet from NHD (I picked up one at random) from http://www.newhavendisplay.com/specs/NHD-0216K3Z-NSW-BBW.pdf and the one posted have a nice command set matching (including I2C address).

Even the 0xFE command, will most likely work on the NHD since it may not have been documented on their data sheet.

An easy test to do and it would be nice to know if it works.
Logged

   

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 4393
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Considering that, what are my other options for using this LCD using the fewest possible wires ?

You could try using the regular serial interface and the example Arduino code available at the NKCElectronics website.

Quote
An easy test to do and it would be nice to know if it works.

It certainly is worth a try but be aware that at least some of the New Haven devices use a controller that is largely, but not completely, compatible with the Hitachi.

Don
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried getting the  LCDi2cNHD Library to work but for some reason it wouldn't even compile, many error messages.

I ended up removing the jumper that i had soldered and implementing the screen using the Serial communication and it worked just fine.

I appreciate your help smiley

Pete
Logged

Pages: [1]   Go Up
Jump to: