08-04-2009 04:57 PM
Hello,
I am looking for a starting point.
My problem is I need to communicate with the PCA9555 (http://focus.ti.com/lit/ds/symlink/pca9555.pdf). I have searched the NI website and have come across a USB-8451 that seems to be the answer to my problem. However, I need to also measure current and this device seems to lack that ability.
First off, would this be the device I would want to use to communicate via I2C? The only reason I question this is because I cannot access the examples that would give me a good sense that I found what I was looking for.
Secondly, is there a device like this offered by NI that would be able to communicate via I2C and be able to measure current? Or do I have to purchase 2 separate devices?
Thirdly, is there anybody out there who has encountered the same problem (possibly with the same PCA9555)?
Thank you,
Gerardo Hernandez
Solved! Go to Solution.
08-04-2009 05:49 PM
The 8451 is just a communication device. It will be able to control that chip, but it cannot measure current. I am assuming you want to measure the current of each output? To do this you will need to use some sort of DAQ device. NI offers many. If you're having trouble picking one then just contact your local NI sales rep.
Note: I do not know what your programming experience level is. If you're fairly adept, then an alternative to the 8451 is something like the Diolan U2C-12. It is much less expensive than the 8451, but it uses a DLL, which means you would need to write wrapper VIs to control it. We have several of these in our lab, and I have written the driver VIs, but unfortunately I cannot distribute them due to company proprietary issues.
08-04-2009 09:58 PM
Thank you for your quick response. I could not find any examples for using the 8451. Do you know if the examples are shipped with the device or can I find some online? I went through labview>hellp>example finder>hardware but found nothing
Thank you in advance
Gerardo Hernandez
08-05-2009 09:21 AM
The drivers are available here. I believe the examples are installed with that, but I can't be sure since I don't have one of those devices.
One additional note: Since you need to do some current measuring, and will thus need to get a DAQ card, an alternate solution is to get a DAQ card with some digital I/O and implement the I2C interface using the old-fashioned bit-banging method. In fact, I2C/SPI interfaces such as the one from Cal-Bay, which use the parallel port, do exactly that.
08-05-2009 10:35 AM
Hello,
I have a USB-8451 on my desk in use, and for ease of use in LabVIEW, you cannot beat it; some example code from one of my apps:
Here I am just transmitting an constant sequence (an initialisation sequence for my hardware) to a Slave with address 112 (actually an I2C bus all-call address for my devices).
If you want to keep things easy, I would suggest 2 seperate devices, one being a USB-8451. You can bit-bang I2C, etc at the cost of complexity and dev time.
08-05-2009 10:44 AM
macaba wrote:
I have a USB-8451 on my desk in use, and for ease of use in LabVIEW, you cannot beat it;
Well, that's debatable. But, you are from NI, so I can understand the slightly bias. Don't worry, I'm just needling you.
08-05-2009 01:33 PM
Smercurio_fc,
I have done some more searching and came across another device that converts from I2C to either RS-232 or USB. I have attached a PDF of this device below. It comes up as a comport in hareware manager. I think this device is sufficient for my communication and am planning on purchasing the usb-6008 for my data acquisition.
Does LabVIEW have an API to support this device or any device of this nature? I would think so because it shows up as a comport.
Macaba,
The code that you posted is what I am looking for in terms of getting started. Would you be so kind as to elaborate on the function of the numeric array as well as how to pull up those icons?
Thank you,
Gerard
08-05-2009 01:36 PM
I forgot to attach the PDF. Here it is
08-05-2009 01:51 PM
08-06-2009 09:50 AM
I am now using the I2C 2 PC device mentioned above but I sometimes get a "Error -1073807253 occurred at VISA Read Possible reason(s):
VISA: (Hex 0xBFFF006B) A framing error occurred during transfer."
What is this attributed to? the port settings are as follows
9600 baud rate
8 data bits
no parity
1 stop bit
no flow control