LabVIEW Embedded

Showing results for 
Search instead for 
Did you mean: 

how to use the I2C VIs for ARM Embedded system?


Hello everybody,


I have got a development kit including Embedded LabVIEW for ARM with Keil MBC2300 evaluation board with LPC2378 uController.

and I am trying since more than one week but no improvment. so I hope if any body has been used these VIs and get them in work to give me some tips how to start using the I2C VIs for ARM.


Thanks in advance


0 Kudos
Message 1 of 21

Hello Amd1480,


do you think that this discussion can give you a helping hand with your request?


How to implement an I2C Bus with Lanbview embedded?


Please let me know if this was helpful.


Regards, Jan

Jan Kniewasser | Applications Engineer | Tel.: +49 89 7413130 | Fax: +49 89 7146035

0 Kudos
Message 2 of 21

Hello Mr. Jingles,


after I open this thread, I found that thread (How to implement an I2C Bus with Labview embedded?) and I asked there if they have already solved that problem. But it seems there is no body knows how these VIs actually works!!





0 Kudos
Message 3 of 21

.... additionally:

Where Can I Get More Information on the LabVIEW ARM Module's I2C VIs?


Regards, Jan


Jan Kniewasser | Applications Engineer | Tel.: +49 89 7413130 | Fax: +49 89 7146035

0 Kudos
Message 4 of 21

I have got a look at this file but, unfortunately, it does not answer/help to solve my problem.

But now after I modified the LPC2378.c file as Gmg said, I got now a CLK signal on I2C-Port0 (

but I still cannot communicate to my slave device.


Okey, I will try to describe what I am doing and which hardware I am using. As hardware I am using the MCB2300 with LPC2378 uController, which I want to use it in my test application as Master. A temperature sensor DS1613 as a I2C slave device (Data sheet can be seen here: I set the Slave address as 0, and I would like to get a 12-bit resolution measurements. The Master should read every 1 second from the slave. Software I use is LV 8.6 with LV for ARM embedded. So I have done the software as you can see in the figure.

So my question now, what shall I change in this program to be able to read temperature from the DS1613 using MCB2300?

(Note: I tested this sensor using ATMega128 with C++ code and it works as it has to be)




0 Kudos
Message 5 of 21

"The 7-bit bus address is 1 0 0 1 A2 A1 A0, where A2, A1, and A0 are user-selectable through the corresponding input pins."(DS1631 datasheet)


Of course, LabVIEW supports only the I2C0 peripheral but "write address" means your device address on your I2C bus.


P.S. I do think C is more appropriate for AVR than C++.

0 Kudos
Message 6 of 21

Hello NicB,


thank you for replaying.

I gave the DS1631 address 0. so in this case I have set the "write address" input of the Init I2C VI to 0, or shall I set it to 1001000 (binary).


NicB wrote:

P.S. I do think C is more appropriate for AVR than C++.


you are right it was only a typing mistake





0 Kudos
Message 7 of 21

Of course, it shoud be 1001000


You could show the radix for those constant numbers and then choose accordingly with their significance:

  - octal for address (so 110 means A2 A1 A0 combination = 0, 111 for 1, etc.)

  - hex for commands (so Access Config will be AC, as in datasheet)

  - unfortunately you cannot mix radix in the same array, so the configuration register will be C for 12 bit and 8 for 11 bit


Well, what temperature is there? Is it hot?

Message Edited by NicB on 07-30-2009 03:59 PM
0 Kudos
Message 8 of 21

all these constants are in decimal. The last command (170 = 0xAA --> Read command) which I send to the DS1631 in the while loop using the read/write VI should return two bytes. but I become only one byte with 170!!


0 Kudos
Message 9 of 21
the reading temperature should be between 25 and 27°C
0 Kudos
Message 10 of 21