07-28-2009 04:07 AM
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
07-30-2009 09:15 AM
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?
http://forums.ni.com/ni/board/message?board.id=170&message.id=370126&requireLogin=False
Please let me know if this was helpful.
Regards, Jan
07-30-2009 09:44 AM
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!!
greetings
07-30-2009 10:01 AM
.... additionally:
http://digital.ni.com/public.nsf/allkb/0359AF81CE5345D48625751B0071C92C?OpenDocument
Regards, Jan
07-30-2009 01:53 PM
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 (http://forums.ni.com/ni/board/message?board.id=420&message.id=1185#M1185
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: http://www.datasheetcatalog.org/datasheet/maxim/DS1631-DS1731.pdf). 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)
Regards
07-30-2009 03:20 PM
"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++.
07-30-2009 03:53 PM
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
Greetings
07-30-2009 03:57 PM - edited 07-30-2009 03:59 PM
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?
07-30-2009 04:10 PM
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!!
07-30-2009 04:13 PM