11-20-2008 03:29 PM
Hello,
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!
Best,
Helge
11-21-2008 01:48 PM
Hi Helge,
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!
Thanks,
11-22-2008 01:43 PM
Hey Karunya,
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,
Helge
11-24-2008 04:56 PM
Hi Helge,
I will have to look into what I can find and post back.
Thanks for your patience.
11-25-2008 02:27 PM
Hi Helge,
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!
07-28-2009 09:17 AM
Hello HelgeKniep,
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
07-29-2009 06:08 PM
Hi Amd1480,
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?
Kevin S.
Applications Engineer
National Instruments
07-30-2009 02:15 AM
Hello Kevin,
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.
many thanks
07-30-2009 04:02 AM
07-30-2009 04:33 AM - edited 07-30-2009 04:35 AM
Hello,
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.