LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

could somebody give some vi about i2c bus application?

thanks
0 Kudos
Message 1 of 7
(4,048 Views)


@shenzhengpib wrote:
thanks




What are you trying to do? If you only want very slow communication there should be a library out there originally developed by people from Philips which programs the parellel port to do I2C communication. You do need a little hardware adapter which can easily be build yourself on a breadboard. For reliable I2C communication though you do need some dedicated hardware. There are several interfaces available which use the USB bus to connect to the PC and some of them have LabVIEW VI drivers.

Checkout Aardvark from http://www.totalphase.com/products/aardvark-i2c-spi/labview/,
or http://www.telos.info/products/ or http://www.calbay.com/I2C_driver.htm, all with several different types of interfaces with LabVIEW support and also http://www.saelig.com/calibre.htm.

These are by the way all found through google!

If you are into building your own hardware you could also checkout http://www.elektor-electronics.co.uk/Default.aspx?tabid=28&year=2004&month=12&art=51933&PN=On&SearchText=

This is a nice little project and not very expensive. If you decide to go this way I have a LabVIEW driver for it I could put up somewhere.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 2 of 7
(4,039 Views)
dear rolfk:
i think communication by parallel port is enough to me. any detailed info ?Of course if usb is ok, i prefer it. by the way, i cannot download the circuit diagram of you mean in
"If you are into building your own hardware you could also checkout http://www.elektor-electronics.co.uk/Default.aspx?tabid=28&year=2004&month=12&art=51933&PN=On&SearchText="
0 Kudos
Message 3 of 7
(4,025 Views)
Hi Rolf

I don't agree that the parallel port is slow and especially not unreliable.
On a modern pc you get better than 10kHz on I2C (normally 100kHZ) and because it is a a handshaked bus
it is not unreliable, even not under windows.

O the usb chips we use and have seen from other firms you get faster communication but not much faster,
and the latency is even bigger.

The future for I2C is in the USB bus, I agree. We are working on a solution that supports this.
But it will take a few moths to get all software and hardware glued together.
greetings from the Netherlands
0 Kudos
Message 4 of 7
(4,020 Views)


@shenzhengpib wrote:
dear rolfk:
i think communication by parallel port is enough to me. any detailed info ?Of course if usb is ok, i prefer it. by the way, i cannot download the circuit diagram of you mean in
"If you are into building your own hardware you could also checkout http://www.elektor-electronics.co.uk/Default.aspx?tabid=28&year=2004&month=12&art=51933&PN=On&SearchText="




Well, you can but it does cost something!

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 5 of 7
(4,017 Views)


@Albert Geven wrote:
Hi Rolf

I don't agree that the parallel port is slow and especially not unreliable.
On a modern pc you get better than 10kHz on I2C (normally 100kHZ) and because it is a a handshaked bus
it is not unreliable, even not under windows.

O the usb chips we use and have seen from other firms you get faster communication but not much faster,
and the latency is even bigger.

The future for I2C is in the USB bus, I agree. We are working on a solution that supports this.
But it will take a few moths to get all software and hardware glued together.




Well, I didn't want to discredit the parallel port solution from you guys ;-). But to get 100kHz data rate on a parallel port even with relatively modern computers you would probably better implement the whole bit banging in a kernel device driver, don't you? I get an access time of around 10us on average using the provided LabVIEW port IO functions. It seems quite hard to me to manipulate the bits on a parallel port fast enough for such data rates using these VIs as each data bit would need at least 3 or 4 port accesses. You might get close to this by using the fast mode from the Port IO VIs provided through OpenG, but they can't work wonders either.
That said I'm not sure most USB solutions would be really that much faster. PCI on the other hand should easily reach the 400kBit specs. But my notebook doesn't have any parallel or serial port anymore so USB is the only way to get such peripheral IO working for me now 😉

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 6 of 7
(4,015 Views)
Hi Rolf

Indeed we run the low level Io completely in a driver
greetings from the Netherlands
0 Kudos
Message 7 of 7
(4,011 Views)