05-19-2011 09:28 AM
Apologies for cross posting this from the Automotive and Embedded forum but there just doesn't seem to be much "traffic" there (no pun intended) I did a search and only found about four posts that even mention I2C. Most are about CAN.
My only experience with hardware and LabVIEW is controlling instruments using visa. I have an I2C problem I am trying to debug and maybe someone knows if NI makes hardware that will work for me.
I want to trigger an oscilloscope on an I2C write to a specific 24C32 EEPROM address so I can look at the waveform preceding that. Could one of the DAQ cards do this and would I need LV Real Time?
I have a Total Phase I2C monitor and I can log the transactions. But some of the transactions are corrupt and there are mysterious erroneous writes to a few different EEPROM memory locations. Interestingly it writes the address of the I2C device to these locations. So I need to look at the waveform immediately preceding one of these unexplained writes.
Maybe the DAQ card can be the scope if I use analog inputs. If I capture the clock and data is there a vi that already exists that will decode the bit stream?
The way I might go about this is with a PIC microcontroller. I can write a program for that which I can send commands to through LabVIEW. I could tell the PIC to make a digital line go high when it sees a particular bit stream and use that to trigger the scope.
What would you do?
05-19-2011 09:53 AM
On a specific write
That makes it more challenging and could be a pile of work used just one time.
A continuous acq at a high rate to catch the issue then go back through it manually can get you there but a lot of manual scrolling and decyphering.
I think there are some FPGA examples available that support low levl protocols. You may be able to start with there work, not sure.
I'll process this challeng in the background and if I have more ideas I'll share.
Ben
05-19-2011 10:10 AM
05-19-2011 10:16 AM
and there is no physical phenomenon that you can use as a stop trigger?
Ben
05-19-2011 10:20 AM
05-19-2011 10:30 AM
Can you add one and then look for an abscences of same?
Ben
05-19-2011 11:17 AM
Ok more on some thoughts...
Parsing serial datqa from an analog input is a lot of work and requires over-sampling blah blah blah glitches ouch.
If you can get on a pin that you can drive regularly T/F and do a DI task looking for change and when you get a timeout stop the AI contniuous acquisition.
Not easy,
Ben
05-19-2011 11:24 AM
The problem is that I don't have access to the internals of the thing generating the I2C traffic.
Something just occured to me. I have the Total Phase I2C monitor which comes with LabVIEW drivers so I could probably write a program to look for the write then toggle an IO. I don't have any DAQ cards but could buy one. But maybe toggling a pin on the parallel port would do. I know that Windows can take it's sweet time to get around to requests but I think if it takes less than 50mS I should be fine.
12-29-2011 10:52 PM
Hi, Steve.
Did you end up using the Total Phase for this? What kind of response time did you get on the trigger? I'm looking at Corelis for this activity. If the timing's not good enough, I'm heading straight to a PSoC for the I2C monitor + GPIO toggle.
Thanks!
--Todd
12-30-2011 07:59 AM