Newhaven Display NHD‐C0220BiZ New LCD driver library

Library updated to version 1.0.1, which corrects a minor initialization bug that should happend, added some additional comments to the code and verify before sending commands to the LCD that it has been initialised correctly. Available for download in its regular place https://bitbucket.org/fmalpartida/lcd_c0220biz-display-driver/wiki/Home.

Cheers

The library has moved to version V1.1.0. It adds a new generic ST7036 driver class and each particular display can inherit or extend this class. Now the NHD-C0220BIZ is implemented as a sub-class of the ST7036 driver. The methods on the ST7036 methods are not virtual to minimise the RAM usage, careful if using pointers to the class.

It also has an LCD API 1.0 pure abstract class to simplify development of other LCDs. It should only be used for development and to check LCD API compliance, if not it will consume about 100 bytes of RAM. When deploying a new driver class derived from the LCD API class, remove inheritance from it.

Hi Malpartida,
i found your online shop and it is verywell

i tring to use your library on an ST7032i display, but whit no success.
i read in you documentation that this controller "should" be compatible.

May you help me on it ?

The i2c address respond to 12c_Scanner on 0x3E, i changed it in your temperature demo sketch.
On the ide serial monitor i receive the temperature and the Ram value also (1538), but the lcd are always black, the yellow backlight led are on, the display also i think are on, because it is black (it is a N-negative lcd, the background is black)

I tryed with BoosterON and 2 capacitor, and with booster off (in this case i use +5V on VOut)

this is the lcd, it is very cheap and beauty
http://www.ebay.it/itm/LCD-Display-IIC-I2C-2x8-Orange-neg-8x2-FSTN-/160527489753?pt=Bauteile&hash=item25602f1ad9#ht_1303wt_754

Thanks in advance

Arduino Uno
Ide 1.0

First of all, thanks for using the library.

Try to shiftright the address when initialising the LCD, i.e. Use address (0x3E >> 1), if I remember corectly, sytronix specifies the address with the read bit included. Have you tried in the arduino SDK to write to the LCD on that address and go an ACK?

If there is no joy, I will take a look at the library and datasheet tomorrow and get back.

Cheers

i found a sketch that work,
tomorrow i check your library compared to this sketch.
i post the link, so it may help other person

if we understand the difference may update your library and Officially insert the ST7032i support

p.s. in your comment in the library you write that the display xxx.xxxx 3V3, means a 3,3V diplay.
This is not correct. All the diplay that you mention are 3V, the other "3" means 3V led backlight

3V= 3V lcd no backlight
3V3= 3V lcd with 3(fV) led backlight

Thats odd, in the LCD datasheet says that the supply voltage is 3.3V, well: min - 2.7V, typ - 3.3V, max - 3.5V.

Do keep me posted, as I can do an upgrade to the library to support both LCD drivers.

yes, you are right, but if you look the NHD-C0216CiZ-FSW-FBW-3V3 model, I'm right :slight_smile:

the name is the same 3V3 and the datasheet is different, no problem. I use it on 5V and work :slight_smile:
the controller itself support 2.7 to 5.5V (for logic part)

I was looking briefly at the datasheet and if you initialize the library with the base I2C address 7C, it may work since the library internally converts what's in the datasheet to the internal AVR I2C address scheme.

Have you looked at the code in the link you posted?

i tried with 7C, no work

i made other test also, i removed the bitshift right operator from all libraries, and directly specified 0x3E (this is my real address) but no work

i will continue.

p.s. often, like in my case, the lcd do not have datasheet or it is not simple found it.
so the only way for found the address is scanning the i2c bus.
Whit your bitshif tecnique will be difficult use the library.
i think it is better do not use it, and found the real i2c address for every lcd.

this is my change in your code:

  • in the main sketch: 2x8character and my i2c
//LCD_C0220BIZ lcd = LCD_C0220BIZ ( );
ST7036 lcd = ST7036 ( 2, 8, 0x3E );

in the ST7036.cpp i changed the LCD Initialization, copied from the working sketch

void ST7036::init () 
{
   size_t retVal; 
   // Initialise the Wire library.
   Wire.begin();
   
   Wire.beginTransmission ( _i2cAddress );
   Wire.write ( 0x00 );   // Send command to the display
   Wire.write ( FUNC_SET_TBL0 );
   delay (10);
   Wire.write ( FUNC_SET_TBL1 );
   delay (10);
   Wire.write ( 0x14 );  // Set BIAS - 1/5
   Wire.write (0x70 | (contrast & 15));  // Set contrast low byte ex 0x73
   Wire.write (0x5c | (contrast >> 4 & 3));  // ICON disp on, Booster on, Contrast high byte  ex 0x5E
   Wire.write ( 0x6C );  // Follower circuit (internal), amp ratio (6) ex 0x6D
   delay(300); // aggiunto
   Wire.write (0x38); // function set aggiunto
   Wire.write ( 0x0C );  // Display on
   Wire.write ( 0x01 );  // Clear display
 //  Wire.write ( 0x06 );  // Entry mode set - increment
   _status = Wire.endTransmission ();
   
   if ( _status == 0 )
   {
      _initialised = true;
   }
}

But....nothing, do not work
if you want try other i may make a test for you. for now i continue my project on the Japanease code

   Wire.write (0x38); // function set aggiunto

Wire.write ( 0x0C );  // Display on
  Wire.write ( 0x01 );  // Clear display

If this is supposed to be LCD initialization code you should be aware that its sequence does not follow the recommendations put forth in the data sheet. It doesn't matter how many libraries do it this way, it is still incorrect. No matter how many times it 'works', do not be surprised if you come across a situation where it fails.

Don

thanks floresta for the answer,

the init process are the entire void that i posted:

void ST7036::init ()

not only the part that you post.
I add your 3 lines for test, because on the japanease sketch my display work, and the difference from it and the original fm library are this 3 lines.

fm library (not working): https://bitbucket.org/fmalpartida/lcd_c0220biz-display-driver/wiki/Home
japanease sketch (working): ArduinoでI2CのLCDを制御する

I am trying to Pull the data that is being sent to from a furnace control board to a new haven display via the serial RX pin and get a nice clean output that is sent to a computer via the serial TX on the USB. Does anyone have any suggestions?

on your control board is there rx output ?
do you know the protocol ?

on electronic side do you need only a "ttl/usb" adapter

After a struggle i have managed to get this library working with a newhaven COG LCD NHD-C0216CiZ-FSW-FBW-3V3

the only part i am now struggling with is the Contrast setting.
The specified command
lcd.setContrast(14);
seems to do nothing. Supposedly it has a range between 0-15 but there is no change.
I do not understand the implementation in the data sheet of the follower circuit as this seems to be tied to the follower settings.
Has anyone got any experience using this library successfully that may have an answer?

Thanks

works for Midas display, just had to change some pins for I²C and replace all "Wire.send" with "Wire.write".

thanks Testato :slight_smile:
:sweat_smile:

try my library, look at the signature, it should work better and with new functions
which is the model of your display ?

Hello Arduino developers!

I have problems with my i2c LCD http://www.newhavendisplay.com/specs/NHD-C0216CiZ-FSW-FBW-3V3.pdf .

I try to use the japanease sketch and Testato library but my project don't run.

I have the problem when I send the buffer for i2c, the program take a break in the line Wire.endTransmission(); only when I turn off my LCD the loop run.

PLEASE HELP!! I change the pull up resistor (2,2 Kohm and 10 Kohm) and double check my diagram wiring, but the problem persist.

#include <Wire.h>

void setup(){
  pinMode(2, OUTPUT); 
  pinMode(13, OUTPUT); 
  //Select device
  digitalWrite(2, HIGH);
  delay(10);
  digitalWrite(2, LOW);
  delay(50);
  //start i2c
  Wire.begin();
  delay(10);
  Wire.beginTransmission(0x7c);
  Wire.write(0x00);
  Wire.write(0x38);
  Wire.endTransmission();// I have problem in this line the project wait here, only when I turn off my LCD the program run
}

void loop(){
  digitalWrite(13, HIGH);
  delay(500);
  digitalWrite(13, LOW);
  delay(500);
}

what appen if you use the HelloWorld example in my library ?

Hello testato!
the firmware never pass of the line:

lcd.init();

How do I watch into your library?
I think so the problem is this line:

Wire.endTransmission();