06-26-2009 01:23 PM
I am trying to communicate with a PIC 16C77 micro in I2C with a NI USB-8451 device. I'm using LabView 8.6 with the generic read and write vi's that came with the device.
The 8451 is a replacement for an old ISA board from calibre which is no longer supported and it had its own labview program that someone wrote in Labview 4 or 5 many years ago that will not work with this USB device. The PIC 16C77micro controls a UPS and keeps track of data like runtime of batteries, output voltage etc. The program would read bytes of data and would translate in english what the parameters were.
My initial goal is to at least establish some sort of write and read. With some help I've obtained what the correct address and clock speed is. However I keep getting errors (see attachment). I know there is an attempt at communications since I have SCL and SDA data on my O'scope at the input to the micro (see attachment).
I'm experienced in Labview but not in this low level com stuff. Does anyone have any specific example vi's that will talk I2C with PIC's and the 8451?
06-29-2009 06:00 PM
Hi Mark,
You should take a look at this tutorial in the NI Developer Zone:
http://zone.ni.com/devzone/cda/tut/p/id/5767
Additionally, there are examples for using I2C in the LabVIEW’s example finder under Hardware Input Output ->I2C and SPI.
Regards,
Matt