Author Topic: NHDC0220BiZ-FS(RGB)-FBW-3VM Baudrate and slave address  (Read 132 times)

DHARMA

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
NHDC0220BiZ-FS(RGB)-FBW-3VM Baudrate and slave address
« on: July 02, 2019, 07:11:24 AM »
Hi all,
I'm working with infineon controller for interfacing lcd using I2C. The LCD is not responding to the slave address specified in the datasheet (0x78), i tried shifting (0x78<<1) and also with other addresses (0x38 , 0x79), but no results. I need to know the baud rate for this lcd and correct slave address.Please help.
« Last Edit: July 02, 2019, 04:22:01 PM by Alee_S »

Alee_S

  • Administrator
  • Jr. Member
  • *****
  • Posts: 50
  • Karma: 0
    • View Profile
Hi Dharma,

Baud rate is a term usually used for RS-232 or serial communication, and not for I2C communication. The rated frequency for this display has been attached, taken from the display datasheet.

After referencing and testing our sample code with a display at the lab, using (0x3C) as our slave address seems to do the trick in order to communicate with the LCD.
Code: [Select]

#include <Wire.h>

int RES = 22;

/********Arduino Mega********/
int ASDA = 20;
int ASCL = 21;
/********Arduino Mega********/




/********Arduino Uno********/
//int ASDA = 19;
//int ASCL = 18;
/********Arduino Uno********/

int test = 55;

unsigned char text1[]={"Newhaven Display"};
unsigned char text2[]={"    I2C TEST    "};
unsigned char text3[]={" March 21 2014  "};
unsigned char text4[]={" Michael LaVine "};

const char slave2w = 0x3C;  //3E for CiZ (0x7C shifted over 1 bit)  //3C for BiZ (0x78 shifted over 1 bit)
const char comsend = 0x00;
const char datasend = 0x40;
const char line2 = 0xC0;

void show(unsigned char *text)
{
  int n, d;
  d=0x00;
  Wire.beginTransmission(slave2w);
  Wire.write(datasend);
  for(n=0;n<16;n++)
  {
    Wire.write(*text);
    ++text;
  }
  Wire.endTransmission();
}

void nextline(void)
{
  Wire.beginTransmission(slave2w);
  Wire.write(comsend);
  Wire.write(line2);
  Wire.endTransmission();
}

void CGRAM(void)
{
  Wire.beginTransmission(slave2w);
  Wire.write(comsend);
  Wire.write(0x38);
  Wire.write(0x40);
  Wire.endTransmission();
  delay(10);
  Wire.beginTransmission(slave2w);
  Wire.write(datasend);
  Wire.write(0x00);
  Wire.write(0x1E);
  Wire.write(0x18);
  Wire.write(0x14);
  Wire.write(0x12);
  Wire.write(0x01);
  Wire.write(0x00);
  Wire.write(0x00);
  Wire.endTransmission();
}

void CiZ_init()
{
  Wire.beginTransmission(slave2w);
  Wire.write(comsend);
  Wire.write(0x38);
  delay(10);
  Wire.write(0x39);
  delay(10);
  Wire.write(0x14);
  Wire.write(0x70); //was 70
  Wire.write(0x5E);
  Wire.write(0x6D);
  Wire.write(0x0C);
  Wire.write(0x01);
  Wire.write(0x06);
  Wire.endTransmission();
 
  CGRAM();
 
  Wire.beginTransmission(slave2w);
  Wire.write(comsend);
  Wire.write(0x39);
  Wire.write(0x01);
  test = Wire.endTransmission();
  Wire.endTransmission();
  if(test!=0)
  {
    while(1)
    {
      delay(100);
    }
  }
  delay(10);
}

void setup()
{
  pinMode(RES, OUTPUT);
  pinMode(ASCL, OUTPUT);
  pinMode(ASDA, OUTPUT);
  digitalWrite(RES, HIGH);
  delay(10);
  digitalWrite(ASCL, LOW);
  digitalWrite(ASDA, LOW);
  delay(10);
 
  delay(10);
  //CiZ_init();
  //delay(5);
}

void loop()
{
 
  Wire.begin();
  //TWBR = 12;
  //TWSR |= _BV(TWPS0);
  while(1)
  {
  CiZ_init();
  show(text1);
  nextline();
  show(text2);
  delay(1000);
 
  CiZ_init();
  show(text3);
  nextline();
  show(text4);
  delay(1000);
  }
}

If this does not work, please try slowing down your transmission speed to see if this makes a difference.

Best,


DHARMA

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: NHDC0220BiZ-FS(RGB)-FBW-3VM Baudrate and slave address
« Reply #2 on: July 03, 2019, 01:40:29 AM »
Hi Alee_S,
Thanks for your update,could you please share any details about hardware configuration for lcd SCL and SDA (resistor values). Thanks

Alee_S

  • Administrator
  • Jr. Member
  • *****
  • Posts: 50
  • Karma: 0
    • View Profile
Re: NHDC0220BiZ-FS(RGB)-FBW-3VM Baudrate and slave address
« Reply #3 on: July 08, 2019, 10:27:26 AM »
Hi Dharma,

The datasheet calls for a 10kΩ as a recommended pull-up resistor value for SDA and SCL lines, but any value ranging from 4.7kΩ up to 10kΩ should be sufficient as well.

Best,

 

NHD-0420D3Z - Arduino I2C Address 0x28 SOLVED

Started by andywbBoard Character LCDs

Replies: 1
Views: 1994
Last post August 11, 2018, 01:24:36 AM
by andywb
NHD-0216S3Z-FL-GBW-V3 Cannot Use I2C To Change I2C Address

Started by billtribBoard Character LCDs

Replies: 1
Views: 750
Last post November 26, 2018, 04:06:42 PM
by Ted_M
Data Address

Started by rwamserBoard Character LCDs

Replies: 1
Views: 2527
Last post October 24, 2016, 07:55:52 AM
by Saurabh_B
Changing the Slave Address with NHD-0420D3Z

Started by alkBoard Character LCDs

Replies: 2
Views: 4828
Last post January 13, 2015, 01:53:20 PM
by alk
I2C slave address for LCD NHD-C0220BIZ-FS(RGB)-FBW-3VM

Started by pradeepsysargusBoard Character LCDs

Replies: 2
Views: 3464
Last post February 18, 2017, 06:30:48 AM
by pradeepsysargus