LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger oscilloscope on specific I2C write?

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?

=====================
LabVIEW 2012


0 Kudos
Message 1 of 10
(3,036 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 10
(3,031 Views)
Thanks Ben. The problem with a continuous acquisition is that the problem happens after many hours of activity.
=====================
LabVIEW 2012


0 Kudos
Message 3 of 10
(3,026 Views)

and there is no physical phenomenon that you can use as a stop trigger?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 10
(3,024 Views)
None that I can think of other than the write.
=====================
LabVIEW 2012


0 Kudos
Message 5 of 10
(3,020 Views)

Can you add one and then look for an abscences of same?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 10
(3,016 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 10
(3,012 Views)

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.

=====================
LabVIEW 2012


0 Kudos
Message 8 of 10
(3,010 Views)

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

0 Kudos
Message 9 of 10
(2,942 Views)
I ended up borrowing a Tektronix scope that had built in I2C triggering.
=====================
LabVIEW 2012


Message 10 of 10
(2,937 Views)