Go Down

Topic: Newhaven Display NHD‐C0220BiZ New LCD driver library (Read 8 times) previous topic - next topic

Testato

this is my change in your code:
- in the main sketch: 2x8character and my i2c
Code: [Select]
//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: [Select]
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
- [Guida] IDE - http://goo.gl/ln6glr
- [Lib] ST7032i LCD I2C - http://goo.gl/GNojT6
- [Lib] PCF8574+HD44780 LCD I2C - http://goo.gl/r7CstH

floresta

Quote
Code: [Select]
   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

Testato

#17
Feb 22, 2012, 09:05 am Last Edit: Feb 22, 2012, 09:08 am by Testato Reason: 1
thanks floresta for the answer,

the init process are the entire void that i posted:
Code: [Select]
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
- [Guida] IDE - http://goo.gl/ln6glr
- [Lib] ST7032i LCD I2C - http://goo.gl/GNojT6
- [Lib] PCF8574+HD44780 LCD I2C - http://goo.gl/r7CstH

cpyarger

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?

Testato

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

on electronic side do you need only a "ttl/usb" adapter
- [Guida] IDE - http://goo.gl/ln6glr
- [Lib] ST7032i LCD I2C - http://goo.gl/GNojT6
- [Lib] PCF8574+HD44780 LCD I2C - http://goo.gl/r7CstH

Lsnyman

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

m00ny

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-sweat:

Testato

try my library, look at the signature, it should work better and with new functions
which is the model of your display ?
- [Guida] IDE - http://goo.gl/ln6glr
- [Lib] ST7032i LCD I2C - http://goo.gl/GNojT6
- [Lib] PCF8574+HD44780 LCD I2C - http://goo.gl/r7CstH

fidodido18

#23
Nov 02, 2013, 08:29 pm Last Edit: Nov 02, 2013, 08:46 pm by fidodido18 Reason: 1
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: [Select]
#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);
}



Testato

what appen if you use the HelloWorld example in my library ?
- [Guida] IDE - http://goo.gl/ln6glr
- [Lib] ST7032i LCD I2C - http://goo.gl/GNojT6
- [Lib] PCF8574+HD44780 LCD I2C - http://goo.gl/r7CstH

fidodido18

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

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

Code: [Select]
Wire.endTransmission();

Testato

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
- [Guida] IDE - http://goo.gl/ln6glr
- [Lib] ST7032i LCD I2C - http://goo.gl/GNojT6
- [Lib] PCF8574+HD44780 LCD I2C - http://goo.gl/r7CstH

fm

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.
   

Go Up