09-01-2006 05:38 PM
09-05-2006
04:11 AM
- last edited on
06-03-2024
04:49 PM
by
Content Cleaner
Hi MB,
It’s fairly easy to get LabVIEW to act as an I2C bus MASTER, using either our USB 8451 (which generates the bus signals and includes the re-built programming API as standard), any of the DAQ products (use the digital output lines with some external hardware to generate the bus, then program the protocol at the bit level using DAQmx), or even doing bit manipulation using the LPT port (there are some drivers written for a board called the K8000 which uses the printer port to expose an I2C bus – I’ve used this system before with success).
K8000 drivers for LabVIEW
http://home.deds.nl/~jh1996/AHH/Index.html
The problem comes as you want to implement a SLAVE. The 8451 currently doesn’t support a Slave mode, although it has been made as a product suggestion. The link below explains that this is not an easy task if you are expecting to run the software under Windows, as it is not deterministic enough to cope with the timing regulations the I2C master will enforce on the bus.
Problems with making I2C slaves in software
http://www.telos.de/Slave.355.0.html?&no_cache=1
As it suggests, you would need a Real-Time Operating System to achieve this. We do have Real Time OS-es, which may be programmed using the LabVIEW Real Time module, but you would have to dedicate the machine you were using to simulate the Slave to an RT OS rather than Windows (or use one of our RT targets, such as cRIO or cFP).
LabVIEW Real Time
The only other possible way you could do this is to implement the I2C protocol in hardware, using our FPGA module.
The only other thing I’ve found while researching, is the device below – which is referenced in the article about Slaves (above) – as being able to achieve a bus Slave and is said to have LabVIEW support – we haven’t tried it and can’t comment on how good it may be, but it could be a good avenue worth pursuing.
Tracii 400
http://www.telos.de/index.php?id=63
And an LPT I2C adapter which may or may not support slave mode (I suspect not).
Cal-Bay – I2C adapter LPT port
http://199.236.97.204/product16.html#
I hope some of this information helps.
Best wishes,
Mark Lee
National Instruments