I want to write a code that displays 11 analogue values 0 to 10 values to 2 pcs. PCF8574 i2c chips.
The first 9 (0 to 8) values must be read out BAR-wise (cumulative) to chip1 and the last 2 values to both chip1 and chip2.
LEDs are connected to the port outputs on the PCF8574 chips. (see picture below).
I have the ciricuit built up but i may have given myself a bigger task than i can manage
You are missing pull up resistors on the two I2C lines, 4K7 should do.
You are also missing setting the address select lines A0 to A3. These must be wired either high or low to define the address of each chip. Note no two chips can have the same address.
Finally you have no supply decoupling each PCF8574 chip needs a ceramic 0.1uF between power and ground with the leads as short as possible.
So now is the opportunity to learn. Look up the terms you don't understand and see if you can do it yourself. If you can't ask here specific questions about what you don't understand.
The aim on this forum is to help you, not do it for you.
If you are looking for someone to do it for you then either wait a while and see if a hardware monkey comes along, or if you like I can move this into the paid section and state how much you are willing to pay.
And do some of the simple examples, before attacking your project.
Get some LEDs operating on just ONE 8574 and see how to control them.
Do it in stages.
Do you have any hardware in the real world, or are you just simulating it at the moment?
hi,
in addition to correcting the problems pointed out by
and
, so that we can better help you, I suggest that you post, (using the </> tags), your best attempt at code written by you, even if it doesn't work as you need.