Raj, that's an idiosyncracy of the I2C bus specification and the design of every I2C device, not of the library
Johanna, there are several things that might be going wrong. Can you share the code you're using to perform a read operation?
Hi Johanna -
It looks like you modified three of the library VIs, and you're calling on two different copies of one of those:
- Add Start Condition Modif.vi
- Add Stop Condition Modif.vi
- Add Acknolwedge Bit Modif.vi
- Add Acknolwedge Bit Modif2.vi
We'll need to see those to really know what's going on in your program.
Hi Johanna -
I got your program to run (by adding your modified VIs to my installation of IDW's library) and looked at the waveform output. The first thing I noticed is that you have the VIs generating values of '1' on the lines.
There are corner cases where driving a voltage into an I2C slave device (like your EEPROM) is acceptable, but as a general rule I advise against it. The IDW library uses the Z state to indicate a high line or a bit value of '1', so the pullup resistors on the bus can draw the line to its high voltage as they are intended to do. I2C is an open-drain bus by specification, and driving current onto the bus from your 6551 could cause things to miscommunicate or function improperly.
Were you able to read or write?
Now, about what you wrote in your message; do you mean that a Z and a 1 are the same? Because watching the sda line on a scope, i could tell the difference and i thought it would matter fo the device, so i changed the Z into 1, as you saw. But basically, the reason why I changed Zs into 1s was because the programm just didn't work.
That is why i asked for help, wanting to know if anyone had already succeded in the use of this library, because i couldn't.
Hi Johanna -
I don't have a PCF8574AP, nor do I have any hardware set up at my desk right now to execute the code on. The '1's may not make a difference in your situation, but if it's not working with them, you may as well change them to 'Z's so you know at least that part of the code is written the way it's supposed to be. There are lots of details involved in getting a vector-based device to communicate with a protocol-enabled chip, so the process is prone to trial-and-error. There could be problems in:
In general, I can help to some degree with the first two bullet points. The comments in your code are French, and I don't speak French, so it's a little more difficult for me to help debug your application without investing a large amount of time in reading through the code and the chip's spec sheet.
As for IDW, I assure you it works. I only published it after a few successes with it, and I've heard from several people around the world whom it has made successful since first publication.
You have said that "the programm just didn't work". Can you be more specific about how? Can you describe the behaviors you're seeing and what you expect to happen? Or if you're getting any error messages, I'd like to know what those are. If a screenshot of your program's front panel would be helpful in showing what you see, you can attach that, too.