Pages: 1 [2]   Go Down
Author Topic: Newhaven Display NHD‐C0220BiZ New LCD driver library  (Read 7179 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Faraday Member
**
Karma: 45
Posts: 5790
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

this is my change in your code:
- in the main sketch: 2x8character and my i2c
Code:
//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
Code:
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
Logged

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

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

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

0
Offline Offline
Faraday Member
**
Karma: 45
Posts: 5790
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks floresta for the answer,

the init process are the entire void that i posted:
Code:
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): http://morimori2008.web.fc2.com/contents/Arduino/i2cLCD_Arduino.html
« Last Edit: February 22, 2012, 03:08:52 am by Testato » Logged

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

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

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

0
Offline Offline
Faraday Member
**
Karma: 45
Posts: 5790
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

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

Offline Offline
Full Member
***
Karma: 2
Posts: 106
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

http://www.newhavendisplay.com/specs/NHD-C0216CiZ-FSW-FBW-3V3.pdf
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
Logged

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

http://morimori2008.web.fc2.com/contents/Arduino/i2cLCD_Arduino.html

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

thanks Testato smiley
 smiley-sweat
Logged

0
Offline Offline
Faraday Member
**
Karma: 45
Posts: 5790
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

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

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.

Code:
#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);
}

« Last Edit: November 02, 2013, 02:46:36 pm by fidodido18 » Logged

0
Offline Offline
Faraday Member
**
Karma: 45
Posts: 5790
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

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

Hello testato!
the firmware never pass of the line:
Code:
lcd.init(); 

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

Code:
Wire.endTransmission();
Logged

0
Offline Offline
Faraday Member
**
Karma: 45
Posts: 5790
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

my library is downlodable from my sign, you may open it with notepad or other editor, if you are not expert in c programming it is not simple understand the code inside a library.
try yourself
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: 40
Posts: 2182
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I confirm that the setContrast method does almost nothing. It only configures the lower bits of the contrast settings. The library need a bit of refactoring and shadowing.
Logged

   

Pages: 1 [2]   Go Up
Jump to: