Pages: [1] 2   Go Down
Author Topic: Newhaven Display NHD‐C0220BiZ New LCD driver library  (Read 7738 times)
0 Members and 1 Guest are viewing this topic.
Málaga, Spain
Offline Offline
Edison Member
*
Karma: 41
Posts: 2182
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

I have just published a new library to drive the NHD-C0220BiZ‐FSW‐FBW‐3V3M i2c LCD. The display is driven by the STST7036 driver therefore, with some minor modifications, it can be used with any LCD that uses the same driver. The driver follows the LCD API v1.0 by dale@wentztech.com and supports all the functionality with some minor limitations.

The NHD-C0220BiZ is a 2x20 LCD very slim, crisp and provides a very nice contrast level. The use of an i2c interface to drive it leaves a lot of free IO on the Arduino.

The library implements the full LCD API v1.0 apart from the keypad method (well the display doesn't have one, so...) and it also relies on an external IO pin to drive the backlight.

You can download it and use it from https://bitbucket.org/fmalpartida/lcd_c0220biz-display-driver/wiki/Home.

I have also included a demo project that reads the ambient light from an LDR connected to an analog pin and displays it on the LCD (both numerically and as a bar graph). It also demonstrates how you can download your own characters to the LCD.

I am new to this forum so if you let me know how to place the library in the LCD library section, I will be more than happy to put a description there too and a link to download it.

Comments, queries and suggestions are very welcome.

Cheers.
« Last Edit: August 22, 2011, 04:15:13 am by fmalpartida » Logged

   

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27386
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Germany
Offline Offline
Edison Member
*
Karma: 137
Posts: 1529
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

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

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 http://arduino.cc/playground/Code/LCDi2c.
Logged

   

Germany
Offline Offline
Edison Member
*
Karma: 137
Posts: 1529
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

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

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.
Logged

   

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

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
Logged

   

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

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.
Logged

   

0
Offline Offline
Faraday Member
**
Karma: 48
Posts: 5991
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

- [Guida] IDE - http://goo.gl/ln6glr
- [Lib] ST7032i LCD I2C - http://goo.gl/GNojT6
- [Lib] PCF8574+HD44780 LCD I2C - http://goo.gl/r7CstH

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

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
« Last Edit: February 19, 2012, 06:10:45 pm by fm » Logged

   

0
Offline Offline
Faraday Member
**
Karma: 48
Posts: 5991
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
http://morimori2008.web.fc2.com/contents/Arduino/i2cLCD_Arduino.html

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

Logged

- [Guida] IDE - http://goo.gl/ln6glr
- [Lib] ST7032i LCD I2C - http://goo.gl/GNojT6
- [Lib] PCF8574+HD44780 LCD I2C - http://goo.gl/r7CstH

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

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

http://www.newhavendisplay.com/specs/NHD-C0220BiZ-FSW-FBW-3V3M.pdf

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

   

0
Offline Offline
Faraday Member
**
Karma: 48
Posts: 5991
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

- [Guida] IDE - http://goo.gl/ln6glr
- [Lib] ST7032i LCD I2C - http://goo.gl/GNojT6
- [Lib] PCF8574+HD44780 LCD I2C - http://goo.gl/r7CstH

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

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?
Logged

   

0
Offline Offline
Faraday Member
**
Karma: 48
Posts: 5991
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

- [Guida] IDE - http://goo.gl/ln6glr
- [Lib] ST7032i LCD I2C - http://goo.gl/GNojT6
- [Lib] PCF8574+HD44780 LCD I2C - http://goo.gl/r7CstH

Pages: [1] 2   Go Up
Jump to: