When sampling on a cheap logic analyzer, how do you pick the sample rate to... - Page 1
Forum section: electronics / projects

author: cdev
author_rank: Super Contributor
timestamp: September 02, 2017, 11:16:09 pm
content: get the most mileage in terms of sample? (lowest working sample rate)

author: ataradov
author_rank: Super Contributor
timestamp: September 03, 2017, 05:23:00 am
content: At lest 2x the lowest frequency you expect to see. That's the minimum, you obviously want more if you plan to do measurements on the captured waveforms.

author: RogerRowland
author_rank: Regular Contributor
timestamp: September 03, 2017, 07:18:59 am
content: Quote from: ataradov on September 03, 2017, 05:23:00 amDon't you mean 2x the highest frequency?

author: alm
author_rank: Super Contributor
timestamp: September 03, 2017, 07:53:40 am
content: Depends on the timing resolution you need. Obviously the sampling interval should be less than the narrowest pulse you expect to see. For RS-232, which has a baud rate tolerance of a few percent, I would sample at at least hundred times the baud rate so I can verify the baud rate accuracy.You can also figure it out through trial and error: lower the sampling rate until the data is no longer correct. Then increase by a few steps to have some margin.

author: ataradov
author_rank: Super Contributor
timestamp: September 03, 2017, 08:31:43 am
content: Quote from: RogerRowland on September 03, 2017, 07:18:59 amYes, obviously.

author: MattSR
author_rank: Regular Contributor
timestamp: September 03, 2017, 11:10:03 am
content: When using a Saleae, for example, long strings of one's and zeros are compressed into next to nothing, so you don't need to really worry about storage space as much as you might think.

author: cdev
author_rank: Super Contributor
timestamp: September 03, 2017, 10:51:48 pm
content: I'm using aRobomatic Mini-Logicandto be honest, I don't know if it compresses when it streams the data to my computer, it probably doesnt..It doesn't compress on capture...However, the LA software I usually use (Sigrok) definitely compresses down the bits quite substantially when a trace is saved.

author: Gyro
author_rank: Super Contributor
timestamp: September 04, 2017, 08:30:45 am
content: Quote from: MattSR on September 03, 2017, 11:10:03 amI'm not sure the Saleae is that bright - I've never seen any reference to it using compression. Do you have a source?Edit: Useful to know that Sigrok does.

author: MattSR
author_rank: Regular Contributor
timestamp: September 04, 2017, 09:22:23 am
content: http://downloads.saleae.com/Saleae+Users+Guide.pdfPage 10 of the user guide. First paragraph, third sentence.Data is compressed by the host, instead of the hardware, so the USB bus needs to still maintain the full rate, however.

author: Fire Doger
author_rank: Regular Contributor
timestamp: September 04, 2017, 11:08:24 am
content: I used saleae clone both with saleae software and Sigrok on max sampling for as long as they can go. Saleae was perfectly fine but sigrock filled 8Gigs of ram in 1-2 min

author: DBecker
author_rank: Frequent Contributor
timestamp: September 05, 2017, 07:25:55 pm
content: The "Saleae clone" is a Cypress USB chip that has a mode that simply clocks 8 inputs into the data FIFO at one of a few fixed clock rates. After configuration, the on-chip microcontroller is barely involved. On the host side, the USB controller DMAs this into memory. The host CPU is barely involved.There isn't any run length encoding, or compression of any kind. Exactly the same work is done sampling rapidly switching signals or fixed levels.Once the samples are in the host's memory buffer, the CPU examines it and does any compression.A sample rate 8x the bit rate is a good choice. This matches the oversampling of a typical UART.

author: cdev
author_rank: Super Contributor
timestamp: September 05, 2017, 10:13:51 pm
content: Compression on the fly is likely to be much slower than a device that just saves it all as fast as it can and worries about compression later.Quote from: MattSR onYesterdayat 03:22:23>http://downloads.saleae.com/Saleae+Users+Guide.pdfPage 10 of the user guide. First paragraph, third sentence.Data is compressed by the host, instead of the hardware, so the USB bus needs to still maintain the full rate, however.

author: MattSR
author_rank: Regular Contributor
timestamp: September 05, 2017, 11:18:25 pm
content: In practice, my unit has no problems at all streaming in real time at the full 500MHz sample rate.