NHD-0420CW-AB3 I2C Setup Question
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?
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");
}
Thanks!
- Will
[attachment deleted by admin]
« Last Edit: February 27, 2016, 04:49:15 PM by Will »
0
-
Ok I solved my own problem. It was the reset pin... I didn't tie it HIGH.
I have the display showing me characters!0 -
O :)
Quick question?
Are you running the display on 5 volts or 3.3 volts?0 -
Yes 3.3v power and logic (see diagram in previous post).
0 -
I see.
On my setup i got the REGVDD connected to GND for 3.3v.
datasheet page 4 https://newhavendisplay.com/content/specs/NHD-0420CW-AB3.pdf[REGVDD=0V for 2.8V operation]0
Please sign in to leave a comment.
Comments
4 comments