I want to implement an I2C Bus with Labview embedded for ARM Microcontrollers. I use the stellaris LM3S8962 evaluation kit. As I am really not sure how to use the given I2C VIs, it would be great if there were some examples. Has anybody already used the I2C VIs in Labview embedded and can post an example? That would be very nice!
Thank you in advance!
There are some examples in the LabVIEW Example Finder. This can be found by going to Help-> Find Examples and searching for I2C. There are also some examples on www.ni.com that deal with I2C with LabVIEW FPGA. There is more information here.
Hope this helps!
Thank you for the fast reply! Perhaps these examples will help me! If you have any examples for the special ARM I2C Vi's, I would be very grateful if you could post them!
These VIs are:
Creates a reference to the I²C device with the configuration you specify.
Writes and reads an array of data to and from an I²C slave device.
Closes an I²C device. Data transmission to the device stops, and the device returns to an idle state.
I am especially interested in what each of the Vis does. For example:
Do I have to send a start condition via the Write/Read Vi or is it sent automatically?
Is it necessary to send the adress of the slave or is that done automatically?
The problem is that the reference is some kind of short for these new VIs....
Thank you in advance,
I will have to look into what I can find and post back.
Thanks for your patience.
The source code of the VIs are located at C:\Program Files\National Instruments\LabVIEW 8.6\Targets\Keil\Embedded\RealView\Drivers\ARM\I2C in your computer. This source code will give you more information on how the drivers work. The slaveaddress and more information is there. I will try to figure out what I can looking at the back end code.
Hopefully, this is a bit more helpful!
did you get these VIs in work? I am trying to use them since more than one week.but there is no improvment.
Thanks in advance
What evaluation board are you using? (And what version of what software?)
Have you implemented the pull-up resistors in hardware in order for I2C to work?
I am using LV8.6 with LV for ARM-embedded software. the evaluation board I use is MCB2300 with LPC2378 on board.
the I have already implement the pull-up resistors, but also there is no succes!
it seems if these 3 VIs for I2C have no functions even I2C clock dose not work.
one more thing, how we can select the I2C-Port using these VI's? (there are 3 I2C-Ports on the MCB2300 board).
Kevin, I hope that you can help us to fix this problem.
I don't know if this will help, I have used the USB I2C (not the ARM I2C) before and this is how you assign a slave address to transmit to:
This uses the I2C Configuration property node
I would imagine the ARM I2C VI's will operate in a similar way. The I2C write VI handles the Start and Stop for you.