Newhaven Display NHD‐C0220BiZ New LCD driver library

I think you can create a new entry at the playground for this? Give it a try.

A good library and very well documented code.

You mention the "LCD API v1.0". Is it available for the public? Does the LiquidCrystal Lib follow this API? It would be cool to have a standard API for character and graphics LCDs.

Oliver

Hi Olikraus,

the LCD API 1.0 can be found in the playground area under LCDs, here is a link to it http://arduino.cc/playground/Code/LCDAPI.

The interface is not compatible with the LiquidCrystal library but it is very close. I imagine that the idea behind this library was to create a common library to manage any types of displays, regardless, in your projects. This is as close as I could find to a "standard" definition of an LCD library. If I have some time, I will be creating a virtual class from which drivers can inherit and try to build a richer port folio. I was also thinking about porting the LiquidCrystal library to use this interface and hence have a larger audience.

The LCDi2c Library adheres to this interface and, currently, there are several displays compliant to it. Here is a link to it Arduino Playground - LCDi2c.

Wow, i have never seen that page. I did not found a link to that page. Can it be reached from the playground main page? It seems that the Playground needs some reorganization.

Thanks for the Link,
Oliver

Hi,

yes, the link can be reached from the playground area. Just go to the section "Interfacing with HW" -> "LCD" -> "LCD displays" and there you can find a whole bunch of stuff.

I do agree, having the entire community contributing to the playground it has grown to the best of our abilities and perhaps with a little reorganization... Volunteers?

In any case, it is great to find such an extensive source of information experiences, and in most cases, very well documented.

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