Saleae Logic Analyzer

Go To Last Post
16 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Anyone with any experience with the Saleae Logic analyzer?
http://www.saleae.com/logic/
I am concerned with accuracy. I have tried other USB logic analyzers that were inaccurate.

I set up a pin in an avr to pulse every 70uS. I tested it with an expensive Logic Analyzer from a colleague, it was dead on.

I tried a friend's $250 USB logic analyzer and the pulse measurement was more than 10 - 20 uS off. The USB port was not being used by any other programs and the PC was running smoothly, so that is not an issue.

The Saleae Logic Analyzer looks like it would be very easy (and very handy) to use, and the price is not too steep.

Any advice would be appreciated.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just bought one of these last last month. I reckon its awesome, particularly the "Analyser" feature that decodes Async,SPI,I²C before your very eyes.
Coundn't tell you about your specific requirement though, as I havent used it for that purpose. If I get the chance, I'll set up the scenario you prescribe. How long is the pulse you used?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well the good news is that it will perform acurately for your 70µs pulse. I set up a timer to generate a tone that I could adjust and the auto pulse width / frequency measurment feature worked like a charm. I had a consistant high pulse of 12.5µs, and varied the duration of the low half of the cycle up to 15kHz.

On the down side, I discovered that my code was not producing the 50% DC I thought it was. Although its still an up side that I found it. Now to fix the problem!

Cheers,
Steve

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have the device.

How long is the pulse that is generated every 70us?

But it all depends on the sampling rate. For instance, at 12MHz sampling rate, the pins are sampled every 83ns, so as long as you can guarantee that the pulse is longer than 83ns, it will be sampled at some point during the pulse, once or several times, two times if the pulse is longer than 166ns. So if the pulse is smaller than 83ns, either the 12MHz sampling clock happens during the pulse or not, so you will see it on screen or not.

If measuring the pulse is a problem because it is too short, maybe you should feed the pulse to some kind of system that will make the pulse longer, still happening every 70us. For example, if it is a logic level pulse, I might try feeding the pulse to a D flip-flop which toggles every time it sees the pulse. The toggling every 70us should be easy to see.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The pulse was 70uS (50%)
and I checked the code in avrstudio simulator.

Very good information, thanks guys. The unit is only $150 and it should cover what I need (for now). Convienience is also a key factor.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But then it is not a pulse, it is square wave.

Is 70us how much the pulse duration or square wave period?

In any case you are talking about things less than 50kHz, it should be measured easily.

But if the pulse is not sharp or you have something funny with the logic levels, it might be due to logic thresholds that you only see a shorter pulse, because everything under or over some level is 0 or 1, and then there is hysteresis that might not be same for 0->1 and 1->0 transitions.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you can put down a bit more, maybe look at the LogicPort too. I've got it, and it gives you way more channels at way higher speed... (34 channels, 500 MHz).

IMHO the LogicPort was one of the best investments I've ever made.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

c_oflynn wrote:
If you can put down a bit more, maybe look at the LogicPort too. I've got it, and it gives you way more channels at way higher speed... (34 channels, 500 MHz).

IMHO the LogicPort was one of the best investments I've ever made.

And it gives you buffer memory depth of 2048 samples if clocked or 2048 transitions if sample compression is on, before transferring the buffer to PC. It cannot sample continuously between buffers. I have LogicPort too, and it has its uses - more channels, faster speed, but buffer size is it's weakness.

By comparison, Saleae Logic can have buffer memory about the size of free RAM on PC, and sampling speed is limited by USB to be 8-24MHz depending on PC, and sampling is continuous.

So for the logic analyzer side, if more than 8 channels or more than say 12MHz sampling is required, and limited 2048 sample buffer depth is no problem, LogicPort can do it. If 8 channels and about 12MHz continuous sampling is enough but sample buffer of several seconds is required, Saleae Logic can do it. Both do the protocol decoding in software after buffer is full.

If only I2C and/or SPI monitoring is required, Beagle can do both in realtime, up to 4Mhz I2C speed and 24MHz SPI speed (but SPI cannot continuously do that, only in bursts because of USB speed limit).

But again, which device is the best depends on what you want to do with it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok so I investigated my little problem a bit further and it turns out that the piezo transducer I had connected to the output pin (capacitive load) was altering the wave form enough to cause the generated 50% D.C. to appear as 18% to Logic analyser.

I have removed the piezo and retested with otherwise open pin. The wave was about f=15.03kHz (T = 66.5µs).
At 50% D.C. each half period should be around 33.25µs.
I then measured each half period of a random section of 15 cycles and the results are:
Measurement: 33.292 33.333 33.542 33.583
Occurance: 5 10 5 10
Conditions:
Logic Analyser: 5MS at 24MSps
Generator: ATmega128, 8MHz IntRC
So there's one for the stats guys out there.

This is by no means near the limits of the Logic Analyser btw.

Cheers
Steve

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I too have the LogicPort and also consider it a great purchase well worth the cost. It does have a 2048 transition limit for it's buffers and I've hit it a few times as well.

But to clarify, that's 2048 transitions x 32 channels. It will stop when any one of the 32 channels hits 2048 transitions, but it could be up to 2048 transitions on EACH of the 32 channels.

Also it uses data compression. This means that you can sample at 200MHz and still take hours or days to acquire 2048 transitions if the data you are capturing is small or widely spaced.

Here's a few numbers from my LogicPort (signals generated by Tek AFG3021):

                                LOGICPORT 200MHz
      SIGNAL                    FREQ    INTERVAL
12MHz Square wave 0-4V      12,000,080     80nS +5-0
1MHz  Square wave 0-4V       1,000,010      1uS
500.00nS Sq wave 0-4V        2,000,010    500nS
70.00000uS Sq wave 0-4V         14,280     70us
1.000000Hz                           0 999.993ms

LogicPort frequency was via LogicPort's internal frequency counter and the interval was measured by capturing a sample and then measuring 10 individual pulses and averaging. Except for 2 cases all 10 pulses measured were identical. In the 12MHz signal, every other pulse measurement was either 80nS or 85nS, in the other exception, one of the 10 pulses of the 70uS signal measured 69.995uS.

It also appears that the internal frequency counter has a resolution of 10Hz, or at least a DISPLAY resolution of 10Hz.

LogicPort's software is first-rate, and tech support from Harrison at LogicPort (PCTestInstruments) is extremely fast.

One nice feature of the LogicPort that I was unaware of came in handy recently. I was making my AC timer which I turn on at 5:00pm, and it's supposed to transmit it's signal starting at 7:30am and then again every 10 minutes until 8:30.

I was using the RC oscillator in the ATTiny13 which we all know is not very accurate. I used the LogicPort to measure the actual clock pulse interval, and adjusted for it in software. But, how to check if it actually starts firing at 7:30 and how many times after that?

Easy, just have the LogicPort record a file every time it triggers. Sure enough, the next morning, I have 7 data files with time stamps starting at 7:33am and ever 10 minutes after that till 8:33am.

So, I was out 3 minutes in 14.5 hours. Close enough for what I needed, and measured easily with the LogicPort.

I have no interest in PCTestInstruments other than being an extremely satisfied customer.

Cheers,

Tom

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jepael,
Great, information packed post.
-dave

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

Quote:
By comparison, Saleae Logic can have buffer memory about the size of free RAM on PC, and sampling speed is limited by USB to be 8-24MHz depending on PC, and sampling is continuous.

Yes - the LogicPort does have a weakness there! If you want to record a long protocol exchange, the LogicPort isn't useful for that.

But to be honest when I want to do that (sniffing an SPI bus for example), I just use the LogicPort to figure out the timing on the bus. Then I just build an analyzer to do whatever specific stuff I need it to (aka: dump from SPI to serial port).

Also I do FPGA work, which makes good use of the higher speed & channel count of the LogicPort...

Regards,

-Colin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think I will order the Saleae one because of the simplicity (and of course the cost). If you watch their demo video you will see what I am talking about. I think (for the money) it will be all I need right now.

The last few days I have home sick with the flu, so to kill time I have been messing around with some PC based freeware Logic Analyzers, like this one:
http://www.ikalogic.com/scanalogic_home.php
it really works! but the software is somewhat frustrating. VB6 source code was included though.

Another one here:
http://www.xs4all.nl/~jwasys/old/diy2.html
this one works but is inaccurate (to say the least)

this one:
http://tfla-01.berlios.de/
I had a lot of trouble with this one. When I did get it to work (damn windows XP!) Surprisingly it was pretty accurate.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do the PC analyzers all have the same cabling? So they just switch the parallel port data pins to inputs and .. um that's it? Sample the pins and draw to screen?

An relatively old ~1GHz Pentium 4 can do about 700k read or write operations per second. I just had to try that too before I bought Logic. It might be able to do a bit more, but I was just using the following code for write test:

mov cx,0      ; loop 65536 times
mov dx,0378h  ; load parallel port address
mov al,0      ; output all low first
@here:
out dx,al     ; set parallel port pins
not al        ; invert pins
loop @here    ; decrement cx and jump to label if not zero

For read code, I transferred the data directly to video memory, so it might be slower, but I used string operations on IO port, so it might compensate or even make it faster.

mov cx,64000    ; size of visible video mem in bytes
cld             ; string operations increment address
mov ax,0a000h   ; load video memory segment
mov es,ax       ; store video memory segment
mov di,0        ; load video memory offset
mov dx,0379h    ; load parallel port status input address
rep insb        ; do the whole transfer operation
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The saleae mentions esd & overvoltage protection.

Has anyone opened their analyzer , and had a look at the circuit for esd & overvoltage protection ?

I was thinking about how they made it , and keep the 24Mhz bandwidth.

It seems like there are some resistors on the lines , but wont that make troubles on 24Mhz ?

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No I've not opened it and for now I won't.

The Saleae blog has pictures of some Cypress microcontroller chip inside it.

All microcontrollers have built-in ESD and overvoltage protections of some sort. It does not even require the resistors, and the allowed over/undervoltage range is very narrow.

Logic can sample at 24MHz sample rate, but nobody says what the bandwidth really is. Obviously the maximum 24MHz sampling rate limits the maximum bandwith to 12MHz. I guess it can sample 12MHz square wave if it is perfectly in sync with sampling times (uh, never, but anything less than 12MHz will show).

(Another example are modern sound cards that can do 96kHz or 192kHz sampling rates but are the analog filters still designed for 20kHz cutoff).