Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

I2C with USB 8451 and a PIC 16C77 micro

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?

Download All
0 Kudos
Message 1 of 2
(3,486 Views)

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
Matt
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,449 Views)