Components

cancel
Showing results for 
Search instead for 
Did you mean: 

I2C Digital Waveform (IDW)

Johanna, one idiosyncracy I found with the library is that the library expects pull-up resistors on SDA and SCL.  My hardware only required a pull-up resistor on SCL but nothing worked until I added the second pull-up.  Sorry, for the weak response; I'm a novice with the I2C stuff.
0 Kudos
Message 61 of 100
(6,832 Views)

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?

David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 62 of 100
(6,830 Views)

Hi,

I put pull-up resistors to sda and scl lines.

Here is attached what i did with the pcf8574ap.

Thank you so much for your help.

Johanna

0 Kudos
Message 63 of 100
(6,825 Views)

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.

David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 64 of 100
(6,814 Views)

Hi,

You're right, i modified some of the VIs, but i thought you would be able to see them from the main VI.

I attached them.

 

Thank you so much for taking a look.

Johanna

0 Kudos
Message 65 of 100
(6,805 Views)

Hi again, here is the missing one.

Johanna

0 Kudos
Message 66 of 100
(6,804 Views)

Hi,

now i'm thinking, maybe you'll need this too.

Johanna

0 Kudos
Message 67 of 100
(6,800 Views)

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.

 

Capture.PNG

 

 

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.

 

Message Edited by David S. on 05-18-2010 08:58 AM
David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 68 of 100
(6,793 Views)

Hi,

 

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.

 

Johanna

0 Kudos
Message 69 of 100
(6,789 Views)

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:

  • the waveform you're building: timing could be outside the chip's limits, you could be sending the wrong address or data, or you could be using the wrong message construction (e.g. using a repeated start when the chip doesn't recognize it)
  • the configuration of your device
  • the connection between your device and the chip: the bus could be designed incorrectly, a solder point could be broken, or there could be too much capacitance on the lines (leading to rise times that violate the chip's timing spec)
  • the chip itself. It could be a bad unit.


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.

David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 70 of 100
(6,786 Views)