Author Topic: NHD-0420CW-AB3 I2C Setup Question  (Read 2275 times)

Will

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
NHD-0420CW-AB3 I2C Setup Question
« on: February 27, 2016, 02:13:37 PM »
I have the NHD-0420CW-AB3 wired up as shown in my diagram (see attachment) but I can not seem to get the I2C interface up.  I am using the following function to scan the I2C Bus.  All other devices on the Bus are found except for the NHD-0420CW-AB3.  Can you tell what I have wrong?  Thanks!




Code: [Select]
void ScanI2CBus()
{
byte error, address;
int nDevices;

nDevices = 0;
for (address = 1; address < 127; address++)
{
// The i2c_scanner uses the return value of
// the Write.endTransmission to see if
// a device did acknowledge to the address.
Wire.beginTransmission(address);
error = Wire.endTransmission();

if (error == 0)
{
Serial.print(".....I2C device found at address 0x");

if (address < 16)
Serial.print("0");

Serial.print(address, HEX);
Serial.println("");
nDevices++;
}
else if (error == 4)
{
Serial.print(".....Unknown error at address 0x");
if (address < 16)
Serial.println("0");
Serial.println(address, HEX);
}
}

if (nDevices == 0)
Serial.println(".....No I2C devices found\n");
else
Serial.println(".....done\n");
}




- Will

« Last Edit: February 27, 2016, 04:49:15 PM by Will »

Will

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: NHD-0420CW-AB3 I2C Setup Question
« Reply #1 on: February 27, 2016, 11:26:34 PM »
Ok I solved my own problem.  It was the reset pin...  I didn't tie it HIGH.

I have the display showing me characters!

Chris O.

  • Jr. Member
  • **
  • Posts: 35
  • Karma: 5
    • View Profile
Re: NHD-0420CW-AB3 I2C Setup Question
« Reply #2 on: February 27, 2016, 11:28:16 PM »
:)

Chris O.

  • Jr. Member
  • **
  • Posts: 35
  • Karma: 5
    • View Profile
Re: NHD-0420CW-AB3 I2C Setup Question
« Reply #3 on: February 27, 2016, 11:31:04 PM »
Quick question?
Are you running the display on 5 volts or 3.3 volts?

Will

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: NHD-0420CW-AB3 I2C Setup Question
« Reply #4 on: February 28, 2016, 06:52:23 PM »
Yes 3.3v power and logic (see diagram in previous post).


Chris O.

  • Jr. Member
  • **
  • Posts: 35
  • Karma: 5
    • View Profile
Re: NHD-0420CW-AB3 I2C Setup Question
« Reply #5 on: February 28, 2016, 07:39:23 PM »
I see.
On my setup i got the REGVDD connected to GND  for  3.3v.

  datasheet page 4  http://www.newhavendisplay.com/specs/NHD-0420CW-AB3.pdf
  [REGVDD=0V for 2.8V operation]

 

NHD‐0420CW‐AB3 I2C Interface

Started by andersonpdBoard OLEDs

Replies: 1
Views: 2653
Last post January 23, 2015, 10:00:06 AM
by Michael_L
NHD‐0420CW‐AG3: blinking part of text?

Started by RichardRBoard OLEDs

Replies: 2
Views: 2329
Last post February 28, 2017, 03:27:02 PM
by BobG
NHD‐0420CW‐AG3 + I2C + PIC assembly code: trouble getting started

Started by RichardRBoard OLEDs

Replies: 4
Views: 3180
Last post December 17, 2015, 03:12:49 AM
by RichardR
MOVED: NHD-0420CW-AY3 display, text is mirror image

Started by Saurabh_BBoard Character LCDs

Replies: 0
Views: 2084
Last post March 11, 2016, 07:51:03 AM
by Saurabh_B
0420CW-AB3 I2C Talking, Display is off and low current drawn

Started by AreswayBoard OLEDs

Replies: 3
Views: 2797
Last post February 10, 2015, 07:39:49 AM
by Paul_B