Go Down

Topic: Help using logic analyzer on Arduino (Read 10428 times) previous topic - next topic

skyjumper

Hi All...

Well my Saleae Logic 16 has arrived!  What a nice piece of hardware! if only I could get it to work :-(

How do you guys hook your logic analyzers up? I have an I2C device on my board. I put some jumper wires (the kind normally used with breadboards) into the header positions for SCK, SCL (analog 4 and 5) and GND and hooked them up the the analyzer. Started the analyzer sampling, started a sketch that moved some I2C data and.... Nothing :-(

Is there a trick to this?

bperrybap

I don't have the 16 but the original Logic.
I often use the same male/male breadboard jumper wires to connect
the analyzer to the Arduino.

When you say "Nothing" do you mean it samples and you see nothing but solid high or low
or does not never sample?
Are you using any triggers?

If you don't use any triggers, it may fill its buffers before anything happens
or you may need to zoom way out to see the transitions.

Doesn't i2c need the pullups to work?
Try something other than i2c, maybe look at the serial port lines and send some data.
It's kind of cool to see the wave forms and the serial decode.

--- bill



skyjumper

Well I figured out what I did. I The Logic 16 has two 8 port connectors. I plugged the connector into the one ont eh right, which is channels 9 through 16. I was looking for data on channels 1 and 2. Silly me.

Now I just get even pulses.

I2C does need pullups, on the bus. The board has those. So I think i should be seeing valid data. Maybe the wires are too long or something. I can try SPI and see what happens.


graynomad

If the LA triggers you will see something. As I2C idles high do you have a falling edge trigger set?

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

skyjumper


If the LA triggers you will see something. As I2C idles high do you have a falling edge trigger set?



Ah, that was the problem! As soon as i set the falling trigger I get data. Thanks Rob!

graynomad

#5
Jan 28, 2012, 12:58 am Last Edit: Jan 28, 2012, 07:05 am by Graynomad Reason: 1
Good, an LA is by far the most useful tool for this type of work IMO. They should be compulsory :)

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

skyjumper


Good, an LA is by far the most useful tool for type of work IMO. They should be compulsory :)



Now I need to learn more about the I2C protocol. Its handy being able to tap on to the I2C and/or SPI bus via the Arduino headers. I wish I had access to a nice o scope, it would be cool to see how square the signals are on this board. 

I looked at the bit scope, thinking at first for the $300 cost of the Logic 16 that the bit scope, with two analog inputs, was a better idea. But then you add the cost of a half way descent probe and a few other things that were needed, and I decided just to get the logic analyzer.

So then I looked at Logic vs Logic 16. The 16 is twice the price! But once you look into it, its much, much more than twice the analyzer. The software is the same and that's a good thing. The hardware, however, is better than just 8 more channels. The Logic 16 not only adds 8 channels, but they are protected, they can read from a very low voltage up to 5 volts. The data t the PC is buffered, so sampling at high rates can be done with a busy PC without missing data. And, it can sample at a much higher rate than the 8 channel version. The case is a work of art, black aluminum. The bottom has a rubbery base that keeps it from sliding around. The probes seem good quality and you get 16 of them, plus two 8-wire harnesses, plus the USB cable all in a very nice case.

I really had to convince myself to part with the extra $150 above the Logic, but after watching a few reviews on YouTube, I did it, although still begrudgingly. Now that it's here, I'm glad I did.

I'll do a full review after I learn a bit more about how to use it. Over the next few weeks I need to write some I2C code. I already took a crack at it, and quickly realized that without being able to see what's on the bus, I'm not going to get far. So now I have no excuse!


graynomad

Quote
without being able to see what's on the bus, I'm not going to get far.

People develop whole protocols without an LA, buggered if I know how as it's the difference between knowing what's happening and guessing what's happening.

A scope is good as well, those waveforms aren't as nice in the real world as they look on an LA screen :) But in general things work at the physical hardware level these days, it's getting the data flow and higher-level timing right that's the issue.

Quote
I'll do a full review after I learn a bit more

Look forward to it.


_____
Rob
Rob Gray aka the GRAYnomad www.robgray.com

cappy2112


Hi All...

Well my Saleae Logic 16 has arrived!  What a nice piece of hardware! if only I could get it to work :-(

How do you guys hook your logic analyzers up? I have an I2C device on my board. I put some jumper wires (the kind normally used with breadboards) into the header positions for SCK, SCL (analog 4 and 5) and GND and hooked them up the the analyzer. Started the analyzer sampling, started a sketch that moved some I2C data and.... Nothing :-(

Is there a trick to this?



I too bought a Logic 16, it's a nice little analyzer.

The software could use more T markers, as well as bookmarks. There isn't supposed to be an update until mid year.
The triggering options are a bit confusing, but Salea said they were planning on addressing that too.

hardcore

#9
Jan 29, 2012, 11:08 am Last Edit: Jan 29, 2012, 11:14 am by hardcore Reason: 1
It really is not that good a value.
$300 for 16 channels at 12.5Mhz

when you can get 34 at 500 mhz for 80 bucks more
http://www.pctestinstruments.com/

If it was $100 then fine it would be a good solid product, but to be honest it's not even going to keep up with an arduino because you will need to sample at least at two times the clock rate, giving you a max of 4-8 channels.




graynomad

That Logicport is a real nice gadget but I think it's a little "old school", by that I mean that fast and wide with limited sample memory was how we used to have LAs when we had to debug fast timing issues.

For most people these days that is no longer the case, all the fast stuff is inside the chip, we're looking at port bit flipping and serial busses so I doubt there are many instances of having to sample at 2x the Ardiuno's 16Mhz.

That said I found that using very fast assembly language pulses for debugging can defeat the Saleae at times. OTOH being able to see short bursts of high-speed data occurring over 1sec apart is great.

The Logicport only has a 2048 deep buffer, I note that they have compression, do you know how long a sample it can take?

If I had the money I'd be be inclined to buy both, but as I seldom deal with fast logic these days the Saleae does the job. That may change with the new Due should we ever see them.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

bperrybap



If I had the money I'd be be inclined to buy both, but as I seldom deal with fast logic these days the Saleae does the job. That may change with the new Due should we ever see them.

______
Rob


The Maple and Chipkit are real today; no need to wait on Due.
I have a Chipkit Uno32 and for some of the stuff I'm doing, the Saleae Logic (not Logic 16) is simply not fast enough.
Like using pin strobes/pulses for software profiling. They are simply too fast/short to see on the Logic without adding
in s/w delays.

But in general I agree that for most things I'm doing right now, it works just fine.

--- bill

cappy2112



the Saleae Logic (not Logic 16) is simply not fast enough.
Like using pin strobes/pulses for software profiling. They are simply too fast/short to see on the Logic without adding
in s/w delays.
But in general I agree that for most things I'm doing right now, it works just fine.
--- bill
[/quote]

I've used direct port writes on a 16Mhz Uno to trigger my Logic 16. It works fine.
I'm only using 2-3 channels on the Logic 16. The less channels that are used, the higher the sampling rate (within limits).

bperrybap



Quote

the Saleae Logic (not Logic 16) is simply not fast enough.
Like using pin strobes/pulses for software profiling. They are simply too fast/short to see on the Logic without adding
in s/w delays.
But in general I agree that for most things I'm doing right now, it works just fine.
--- bill


I've used direct port writes on a 16Mhz Uno to trigger my Logic 16. It works fine.
I'm only using 2-3 channels on the Logic 16. The less channels that are used, the higher the sampling rate (within limits).



Its not the AVR at 16Mhz that is the issue.
It is the 80mz pic32 that can be too fast for the Logic sampling rates.

The ability to reuse the bandwidth of unused channels on the Logic 16 is great.
That gets quite a bit higher sampling rate when the number of channels is lower than
on the original Logic. Theoretically up to 100Mhz if only using two channels.

The part that I believe is very misleading is:
Quote
Logic16 can save as many as 10B samples,
letting you capture even the most elusive events.
No more dealing with frustratingly small sample buffers


To me there needs to be a big and better distinction between
"sample buffers" in the device which temporarily protects you against USB speed and latency issues,
and the size of the trace that can be stored on the PC.
The Logic 16 is not saving 10B samples, it is Logic 16 application s/w
running on the PC that can save up to 10B samples that it
gets from the Logic 16 via USB.

When streaming the sample data over USB,
USB2 is simply not fast enough to support high speed sampling on very many channels.
USB3 would be better.

What I'd like to see is allowing the Logic/Logic16 to run in either streaming mode, like it works today,
or in "snapshot" mode which is more
like a traditional analyzer which would allow much faster captures but for a much shorter
amount of time as limited by the internal buffer.

For some uses, even the existing limited buffers inside the Logic/Logic16 would be enough
to get pictures of special events, when used with multiple triggers.

--- bill

skyjumper

That seems like a nice analyzer, but I was not about to spend $400. Its bad enough I spent $300! Part of my thinking was that I'm not likely to use 16 channels, or even 8 channels. Mostly, I wanted to see what was happening when I write code for I2C and SPI, since its hard to debug code without knowing what its doing. So two or three channels, maybe 4, is what I need.

My other thinking was that I'll probably need a nice O scope some day, and if it comes to very high speed stuff, I'll use the O scope. But they are pricy, so it can wait.

I had not thought of using it for speed profiling, that's a great idea. One thing I was trying to figure out how to do was to see how quickly my code running on my board (a 16MHz 1284P based board) can respond to an and interrupt and close files on the SD card when power goes away. Now I realize I can throw a pin high when power goes away, another when I enter the ISR and another when the files are closed. This should be fun!


Go Up