07-30-2010 04:21 PM
tbob wrote:I've seen some SPI vi's created by NI that has all of this already coded. You just supply the address and data. I wonder if there are I2C drivers already written. Does anyone know?
Not sure about SPI, but perhaps you're referring to these: http://zone.ni.com/devzone/cda/epd/p/id/6080
@tbob wrote:
The PXI-6251 supports pattern I/O. Do you know what pattern I/O is? You create patterns into waveforms and send the waveforms using the PXI-6251 Digital Out ports. The real trick is to create the proper pattern for SCK and SDA to send an address/command in the proper order with the proper timing, and then to create SCK, tri-state SDA in order to read the data coming back. This is not at all trivial. It is very complex. You need very good Labview skills in order to do this. I would not recommend this approach for a novice.
I doubt that timing will be that much of an issue. For instance, the Cal-Bay interface cards use the parallel port to implement I2C, and that's all software-controlled. We used to have these in the lab to control I2C devices. So, you could also cheat and simply follow what the Cal-Bay drivers do and replace the parallel port calls with calls to a digital I/O line.
I doubt that timing is that much of an issue. For instance, the Cal-Bay interface cards use the parallel port to implement I2C, and that's all software-controlled.
07-30-2010 04:38 PM
@smercurio_fc wrote:
Not sure about SPI, but perhaps you're referring to these: http://zone.ni.com/devzone/cda/epd/p/id/6080
I doubt that timing is that much of an issue. For instance, the Cal-Bay interface cards use the parallel port to implement I2C, and that's all software-controlled.
Yes. This is what I was talking about. I must have gotten them backwards. I thought there was a set of VIs for SPI and not I2C. I'm glad to see the I2C functions are out there.
smercurio_fc wrote:
I doubt that timing will be that much of an issue.
I doubt that timing is that much of an issue. For instance, the Cal-Bay interface cards use the parallel port to implement I2C, and that's all software-controlled.
I was talking about timing when creating the waveforms, to make sure data was settled before clock rising edge. Once the waveform is properly created, you can run at any supported speed using the DIO.