Re: I2C display up and running on my uBITX

Jerry Gaffke

I looked a bit further into this, it's not as trivial a problem as it first seems.
I believe removing the two pullup resistors from the i2c backpack is the best solution if using a 5v i2c display
along with the Raduino's 3.3v si5351, powering the i2c backpack and the display from 5v.
The 3.3v SDA and SCL signals into the 5v powered chip on the backpack is not enough
to be guaranteed to work, though good enough for our purposes.

If you want guarantees, best to go to an i2c level shifter such as  this one previously referenced: 
There are similar i2c displays designed to operate from 3.3v, not 5v.
That is also a good solution, though will require a new 3.3v regulator to power the display
as the 3.3v rail from the Nano can't supply much current.

Here's a schematic of the backpack:
and a datasheet for the PCF8574 chip it uses:

Datasheet says the default i2c write address with no resistors is 0x4E.
the LSB of that address is 0 for write and 1 for read,  so the i2c read address is 0x4F.
In binary, the write address = 0x4E =  0100-1110
Some i2c documentation figure that to be 7 bits of address = 0100-111 = 0x27  plus a R/W bit in the LSB.
Your scanner apparently uses this 7 bit address convention when reporting addresses.
A short across the A0,A1,A2 resistor pads (a piece of wire will do) can change the write address to any of
the eight addresses between 0x27 and 0x20 as described in the TI datasheet referenced above.

It says on this webpage:

"We may send you one of two versions of this device - the difference is the controller IC. If you have the PCF8574T. the default I2C bus address is 0x27. If you have the PCF8574AT the default I2C bus address is 0x3F."

The datasheet for the PCF8574 says it will work fine on anything between 2.5v and 6.0v,
so your powering the i2c backpack from 3.3v is perfectly legal (assuming the Nano's wimpy little regulator can supply it).
Likewise, the HD44780 that is likely on your LCD is good from 2.7v to 5.5v:
However, on page 48 of the HD44780 datasheet is says that the input high voltage must be a minimum of 0.7Vcc = 0.7*5v = 3.5v,
your i2c backpack powered from 3.3v will not be able to meet that spec when the HD44780 is running on 5v.
(Though you have found it to work anyway).

On page 4 of the PCF8574 datasheet, it says input high voltage for this chip should be a minimum of 0.7Vcc as well.
So removing the two 5v pullup resistors from the i2c backpack means SDA and SCL into the PCF8574 won't meet spec,
as they get a max of 3.3v using the Raduino's R13 and R14:
But seems to work, and this is probably the easiest mod to get this i2c display to talk on the same bus as the 3.3v si5351.

Going back to this webpage:
the resistors we want to remove are the 4.7k resistors at R8 and R9, probably marked as "472" (so 47 plus 2 zeros worth of ohms)
There is a third 4.7k that feeds Q1 to turn on the LED, no need to mess with that.
From the photo, I believe the two 4.7k resistors to be removed are in the middle row, nearest the PCF8574 chip.
You should measure 0 ohms between the SDA pin on the 4 pin header to one of the resistors, and 0 ohms from SCL to the other resistor.
I would use two soldering irons, one on each end of the resistor, to pick them off the board, though many here
just use one iron and figure out how to touch both ends simultaneously.

Jerry, KE7ER

On Mon, Jan 22, 2018 at 04:35 pm, Jim Sheldon wrote:
Thanks Jerry,
That cleared up a lot of stuff We were unable to find regarding the controllers and caused a bit of worry regarding possible damage to the Si5351A by running the backpack on 5 volts even with the pullups on SDA & SCL removed.  Now I won't worry about it and will run the next one on 5V and just remove the 2 pullup resistors.
As to addressing, some of these (with all 3 address pads open) have a base address of 0x3F and some have a base of 0x27 and no documentation comes with them, hence the need to run "Scanner" on them.
Thanks again, 

Join to automatically receive all group messages.