LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I2C & Parallel Port

I'm a begginer in labview and I want to know if someone can tell me how to communicate in I2C through the parallel port.Thank you
0 Kudos
Message 1 of 4
(4,028 Views)
Good morning,

Are you trying to communicate directly from the parallel port? If so, you may need to look at the devices you wish to communicate with and find out the command structure and speed at which you can communicate. Some I2C devices are rather slow (Serial EEPROM, for instance).

There are products available to interface to the I2C bus. I use a product from iPort, it is an I2C Host Adapter. Works well. Easy to implement, simply read the manual for instructions. You can also purchase the LV drivers.

As for communicating directly from the parallel port, you will most likely have to create (or purchase) an interface. In order to do so, look at the I2C bus for details. (From memory) The wiring is similar to a serial bus connection.. as a
matter of fact, it may be easier to interface with the serial COMM port..

However, for parallel port communication, there are two useful vi's. They are located in the Functions Palette, under "Advanced" => "Port I/O": In Port.vi and Out Port.vi.

If you have LV7, look for "parallel" in the "NI Example Finder".

Have fun,

JLV
Message 2 of 4
(4,028 Views)
Good morning,

I have Labview 6.1 so I don't have this example and I'm forced to use the parallel port.
I have to send a weave of 13 bytes in write mode and to receive a weave of 6 bytes in read mode.
To send the I2C weave, I have to put a start bit, the device address, my data and a stop bit.
The question is: with the OutPort.VI have I just to put the address of the parallel port, the command and my weave like I've explain it in top?
0 Kudos
Message 3 of 4
(4,028 Views)
xpuibaraud wrote:

> Good morning,
>
> I have Labview 6.1 so I don't have this example and I'm forced to use
> the parallel port.
> I have to send a weave of 13 bytes in write mode and to receive a
> weave of 6 bytes in read mode.
> To send the I2C weave, I have to put a start bit, the device address,
> my data and a stop bit.
> The question is: with the OutPort.VI have I just to put the address of
> the parallel port, the command and my weave like I've explain it in
> top?

No certainly not. You will have to write a VI which generates the I2C
bit pattern sequence. I2C is a serial bus with a clock, handshake and
data line. So you will have to toggle these three lines accordingly
which would make around 25 or so port accesses to write or read a s
ingle
byte.

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