From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use a counter to build a Logic Analyzer?

Solved!
Go to solution

I agree with Laurence that a quick look with an oscilloscope will go a long ways toward getting you started.  If you do not have a scope, try connecting a counter to each of the 4 to 6 signals to see which has the highest frequency.  That is likely the clock.  Also note the frequencies of each of the other signals.

 

It appears that you are trying to look at signals generated by some device about which you have very little information.  I suspect that more information is available than you think.  Are there other devices in the same "class" as the device you are testing, but for which some of this information is available? What does the device do? Is it working correctly or are you trying to repair it?  Can you visually examine the circuit?  Reading part numbers of values of components may provide clues.

 

The more you tell us, the better the chances we will be able to help you.

 

Lynn

0 Kudos
Message 11 of 18
(632 Views)

Hi Lawrence,

 

I don't understand what you mean by the following.

 

If you were analyzing an I2C serial line to find the first n commands, you would need to capture the amount of logic transitions/samples required for that information to be sent. Then you can analyze it and find what they were.


I don't unfortunately have an oscilloscope.

 

I believe the protocol used is LEDM, and the only data sheet I found does not convey any frequencies and high impedence states or any information about the signals and their transmission and algorithms. The data sheey only shows the structure of the messages used in the protocol and their range of fucntions.

 

0 Kudos
Message 12 of 18
(621 Views)

Hi Lynn,

 

I had thought of individually connecting a signal at a time, do you think the information in this http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/How-to-measure-the-frequency-of-a-clock-using... thread is enough for this purpose?

 

It appears that you are trying to look at signals generated by some device about which you have very little information


Correct, the only information available is in the patents, from which I have used all I can I believe. 

 

Are there other devices in the same "class" as the device you are testing, but for which some of this information is available?


Yes, but like the devices I am working on, most information is unavailable.

 

What does the device do? Is it working correctly or are you trying to repair it?


I will get back to you on this one, I need to discuss with my manager if I can divulge this information. Sorry.

 

Can you visually examine the circuit?  Reading part numbers of values of components may provide clues.

 

 

Yes, but the board has no serial number, I believe it is custom made. 


 

 

 

 

0 Kudos
Message 13 of 18
(616 Views)
Solution
Accepted by topic author RedAG

I did not go through all the posts in that thread, but it looks as though they were telling you how to set up a counter.

 

For the basic frequency counter capability you need a timebase, a gate, and a counter.  You count the number of pulses/cycles during the gate time and calculate the frequency.  If the counter overflows, reduce the gate time.  If the count is very small, switch to a period measurement or a longer gate time.

 

If you are trying to reverse engineer a circuit, you really should have an oscilloscope. It will help you identify the nature of signals very quickly. It can spot signals which are not compatible with your digital devices, such as noise, glitches, slow rise/fall times, tri-state conditions, and analog signals.  I have managed quite well for many years without a logic analyzer, but I would never try to analyze any circuit without a scope.

 

Lynn

0 Kudos
Message 14 of 18
(604 Views)

Thanks Lynn.

 

I agree an oscilloscope would have been great, but again my manager does not agree.

 

To give a quick review, a master device is communicating with a slave. The slave only has a memory or counter. The master reads this memory/counter and based on the readings, it would move onto its next operation. I am trying to read in while they are communicating to see what exactle master is reading in, what information the slave stores and if I can actually reset the slave, thereby fooling the master.

 

 

0 Kudos
Message 15 of 18
(593 Views)

RedAG,

 

Since it sounds like an interface that uses the clock to sync everything, the CLK is where you start.  Use the FPGA to determine what the CLK looks like.  Use a double counter method in the FPGA to measure the frequency of the CLK signal and figure out where the rising and falling edges are.  All other data should be valid on either the rising or falling edges.  Use those edges to trigger acquisition of other signals.

0 Kudos
Message 16 of 18
(587 Views)

Thanks Wayne, what the double counter method?

0 Kudos
Message 17 of 18
(579 Views)

RedAG,

 

I suggest that you search the NI website for 'frequency measurement'.  You will discover things like http://www.ni.com/white-paper/7111/en .

0 Kudos
Message 18 of 18
(573 Views)