Newhaven Display Forum

Newhaven Products => OLEDs => Topic started by: Will on February 27, 2016, 02:13:37 PM

Title: NHD-0420CW-AB3 I2C Setup Question
Post by: Will 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

Title: Re: NHD-0420CW-AB3 I2C Setup Question
Post by: Will 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!
Title: Re: NHD-0420CW-AB3 I2C Setup Question
Post by: Chris O. on February 27, 2016, 11:28:16 PM
O  :)
Title: Re: NHD-0420CW-AB3 I2C Setup Question
Post by: Chris O. on February 27, 2016, 11:31:04 PM
Quick question?
Are you running the display on 5 volts or 3.3 volts?
Title: Re: NHD-0420CW-AB3 I2C Setup Question
Post by: Will on February 28, 2016, 06:52:23 PM
Yes 3.3v power and logic (see diagram in previous post).

Title: Re: NHD-0420CW-AB3 I2C Setup Question
Post by: Chris O. 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  (http://www.newhavendisplay.com/specs/NHD-0420CW-AB3.pdf)
  [REGVDD=0V for 2.8V operation]