Changing addresses on PCF8574 boards

All, I an using PCF85743 boards to allow me to control multiple LCD modules via one Nano, and as part of it I am having to change the addresses of some of them.

However I am unsure as to whether when I short out the pins to select the address, should I just short them or should I use a resistor to do so?

Thanks

Les

I am using PCF85743 boards

Is the PCF85743 a typo?

Typically on PCF8574 based LCD backpacks there are jumper holes or solder pads.
While designs vary, often the PCF8574 chip has pullups on the backpack PCB on the address pins and the
jumper or solder bridge is used to ground the PCF8574 pin.
Some designs have dual solder pads (3 pads per address pin) and you solder between the center pad and either side, to set the pin to VCC or GND .

For any of those designs, a resistor is not needed and so far I've not see a case were a resistor is needed.

But to correctly answer your question we would need to see the backpacks you have.

--- bill

Most likely this one:

OK, you just bridge over whichever combination of the "A0", "A1", "A2" pads you require to set the address with solder. R4, R5 and R6 are the pull-ups - 1k is somewhat lower than necessary (5 mA is added for each one you bridge) but you are not short-circuiting anything.

I also have one that has two pads for each address pin with a skinny wire between them.
I really like this as you can alter the address without soldering.
You simply cut the trace to change the address.
If you ever need to change it back, you can solder between the two pads.

— bill

At least is isn't this one!
..

Not only is that one a poor design but it costs around triple the cost of the better ones.

I have a couple backpacks that have address selection pads by they are on the side that is ends up by the LCD PCB.
If you solder the backpack to the LCD, you can't change the address unless you add wires to actual chip.

--- bill

What is poor about almost all of these backpacks is that they come with the I2C pins facing out past pin 1 of the LCD interface - this one is actually marginally better. This means that the Dupont socket ant the connecting wires project out beyond the end of the LCD - since pin 1 is at the end - which interferes with the mounting of the LCD.

The same thing happens with the 4-bay matrix displays.

This one is easy enough to work on, but when the matrix pieces are soldered in place, it is not possible to de-solder the headers. (Took me an hour or so but with minor damage.)

What you want is for the pins to be folded back along the display.

Paul__B:
Most likely this one:

OK, you just bridge over whichever combination of the "A0", "A1", "A2" pads you require to set the address with solder. R4, R5 and R6 are the pull-ups - 1k is somewhat lower than necessary (5 mA is added for each one you bridge) but you are not short-circuiting anything.

Yep, exactly that type.

I have used solder bridges to link the pads but I have had two of the ones I changed just stop working after a few hours use, and wasn't sure if it was due to needing a resistor. They still register with the modified addresses when using I2C scan, and the LCD module lights and shows the matrix dots, but fail to display the data. It's probably just poor quality units, I got thse of Ebay

Cheers

Les

Unless you somehow damaged them in the process of soldering - surely not! - I cannot see any reason at all why changing the address would affect their operation. :roll_eyes:

I think you should firstly check that you are actually coding for the correct address (verify against the I2C scan), check the correct supply getting to the display from your regulated 5 V supply, and provide a picture of what is actually displayed as I am not sure what you are describing.

You have not in this particular thread revealed whether you are using Bill’s HD44780 library installed through the Library Manager, but he provides extensive diagnostics for these modules which I think you should be using to elucidate your problems. :astonished:

How many devices are you using at once?
You can test all the devices at the same time using the I2CexpDiag tool that comes with the hd4480 library.
Just hook up all the devices and then run I2CexpDiag.

--- bill

The reason I asked how many, is that if using the backpack device shown in post #2, it has 4.7k pullups on the backpack.
If you have more than 4 of them on the bus, then you can have issues.
The reason is that i2c signals should really only have 1 pullup on them.
Having more than one can still work, but the overall resistance should not be lower than 1k to ensure that devices can still sink enough current to drive the bus signals low.

With that i2c backpack, if you use more than 4 of them, the combined resistance will drop below 1k.
I'm not sure if will damage the PCF8574 chip or the Arduino processor, but
With that many devices on the bus, you will likely need to modify them to remove some of the pullups to ensure it works properly.

--- bill

bperrybap:
With that i2c backpack, if you use more than 4 of them, the combined resistance will drop below 1k.
I'm not sure if will damage the PCF8574 chip or the Arduino processor,

How? :astonished:

The Arduino (Nano) can easily drive a 1k load (5 mA).

So it appears, can the PCF8574.

bperrybap:
I may be misreading the PCF8574 datasheet, but it looks to me like the IOL for SDA is only guaranteed to 3ma.

OK, better spotted than myself - I could not find it! :roll_eyes:

I may be misreading the PCF8574 datasheet, but it looks to me like the IOL for SDA is only guaranteed to 3ma.
Which would be a minimum pullup resistance of 1.7k at 5v.
Using devices with 4.7k pullups would be limited to 3 of them.

It may work with a lower resistance, but it would be outside the datasheet spec range for current.

--- bill

Bill was referring to the I2C pullup resistors. (I think)

You should only have one pair of external pullup resistors. Multiple pairs will act in parallel requiring Slaves to sink higher currents. With an AVR you are unlikely to have timing or reflection problems.

Ebay modules often have 4k7 mounted.
I2C spec expects typical values of 1k8 - 10k at 5V. 820R - 4k7 at 3.3V
So 4 backpacks will violate the spec.

If you know you have more than 3 backpacks, remove some of the pullups.

The PCF8574 port pins can only sink current. They can't source high currents. (open-drain output)
So "drive" is only appropriate for the Nano (which has push-pull outputs)

David.

david_prentice:
Bill was referring to the I2C pullup resistors. (I think)

Yes, I meant 4.7k pullups on SDA and SCL. You can see them as R8 and R9 in the backpack photo.

--- bill

bperrybap:
How many devices are you using at once?
You can test all the devices at the same time using the I2CexpDiag tool that comes with the hd4480 library.
Just hook up all the devices and then run I2CexpDiag.

— bill

I run a max of three devices off one Nano. I am also using a stabilised 5v supply as suggested in this post

but one unit failed before setting that up, i.e. when I was just powering using the Nano 5v pin

However I was looking at it again this morning and realised the that one that ‘failed’ yesterday was actually an unmodified unit with the solder pads untouched. As such clearly the re-addressing is not the cause of this.

The failed unit is driving the LCD module in the centre, so instead of the Hours:minutes displayed on the top line and seconds on the bottom line, I just get the dot matrix showing as per the photo. The display at the bottom s working fine, it just doesn’t show up in the photo for some reason

I had not heard of the HD4480 library, but if it has diagnostic tools in it I clearly should look at it. I don’t know whether the sketches I run are compatible but let me look into it and see

Cheers

Les

I used the HD44780 test as recommended. First thing to note is that with the Nano ATmega168 the diagnostic test will fail to load due to lack of memory errors.

No problem for me, as I have some older 328P versions so I swapped them over for testing. That showed that the PCF backpacks are indeed OK, and pointed to the probability of some solder connection issues. I checked with a meter and couldn't find anything but reflowed all the joints. That did the trick, so ultimately I have to accept that some of my soldering was marginal, and simply failed after a while due to moving and reconnecting wires or maybe when connected were positioned such that they made contact or broke contact.

Thanks for the help, and glad I now have a great tool to use for the rest of my projects

Cheers

Les

20200414_081538.jpg

OK, all sorted. Dodgy soldering, not entirely surprising.

Lovely panel - where did you get the instruments?

I made them, along with all the others here - a lot of work but a lot of fun

Les

Lesthegringo:
I used the HD44780 test as recommended. First thing to note is that with the Nano ATmega168 the diagnostic test will fail to load due to lack of memory errors.

I'll go look to see if I can reduce the RAM footprint of I2CexpDiag to get it to fit.
Seems like it is using too much RAM. There must be something silly going on.

--- bill