Logic-analyzer capture-size calculator

Enter a decimal or scientific notation, such as 2.5 or 2.5e6. Changing a unit reinterprets its number.

Saleae recommends at least 4. Use about 10 to see timing detail.

Per channel for analyzers that quote memory depth in points; total for a buffer in bytes.

Enter the sample rate and capture time to see the memory.

No capture to draw.

Show the steps

Interactive calculation is unavailable until JavaScript loads. The formulas, worked examples and references below remain available.

Calculate logic-analyzer memory from channels, sample rate and capture time, the capture time a memory allows, or the sample rate a digital signal needs.

How to use

Choose Memory for a capture, Capture time for a memory, or Sample rate for a signal.

Enter the number of channels you will record.

Enter the sample rate and the capture time, or the sample rate and the memory, or the highest signal frequency and the sampling multiple.

Read the memory, capture time or minimum sample rate, with samples per channel and the sample interval.

Copy result copies labelled values; Reset restores the starting fields.

Science

A logic analyzer records each digital channel as one bit per sample. A capture of T seconds at f_s samples per second holds f_s × T samples on every channel, so the raw memory is channels × sample rate × time bits.

Analyzers state memory in two ways. Bench instruments quote a depth in points per channel, which fixes the capture time at depth / sample rate whatever the channel count. Buffers in bytes are shared, so more channels mean a shorter capture. Mixing the two is the most common planning error.

The sample interval is the timing resolution: an edge can fall anywhere between two samples. Saleae recommends sampling digital signals at least 4 times their bandwidth, and Keysight suggests 4 to 10 times the clock for timing analysis. Sampling faster than needed only uses more memory on fixed-memory analyzers.

Limitations: the memory is the uncompressed size. Analyzers that run-length encode, such as Saleae's software, store only changes, so quiet signals use far less memory and busy ones approach this figure. Real analyzers offer fixed sample rates, may lower the maximum rate when more channels are enabled, and add headers and trigger buffers that are not modelled. The sampling multiple is a rule of thumb; signal integrity, glitch capture and protocol timing may need more.

Formulas

Samples: S = f_s × T, rounded up to a whole sample. f_s is the sample rate, T the capture time.

Memory: Bits = N × S; bytes = bits / 8, rounded up. N is the channel count.

Capture time, depth per channel: T = M / f_s. M is the memory depth in points.

Capture time, shared buffer: T = floor(8 × B / N) / f_s. B is the buffer in bytes.

Sample rate: f_s ≥ k × f_sig. f_sig is the highest signal frequency; k = 4 is Saleae's minimum.

Sizes: 1 MB = 10^6 bytes; 1 MiB = 2^20 bytes = 1,048,576 bytes.

Examples

8 channels at 100 MS/s for 1 s: 100 MB (95.3674 MiB). 100,000,000 samples × 8 channels = 800,000,000 bits.

16 channels at 500 MS/s, 4 GiB buffer: 4.29497 s. 8 × 2^32 / 16 = 2,147,483,648 samples per channel; divided by 500 MS/s.

64 Mpts per channel at 100 MS/s: 0.64 s. Depth per channel: the channel count does not matter.

64 MB shared buffer, 16 channels at 100 MS/s: 0.32 s. Common mistake: treating a shared 64 MB buffer as 64 Mpts per channel gives 0.64 s, twice the real capture.

SPI clock 1 MHz, multiple 4: 4 MS/s. Saleae's example: at least 4 MS/s for 1 MHz SPI.

3 channels at 1 MS/s for 1.5 μs: 2 samples per channel; 6 bits; 1 byte. Boundary: 1.5 samples rounds up to 2.

References

Saleae: What sampling rate should I use?

Saleae: Device settings configuration tips

Saleae: What is the maximum bandwidth of Logic?

NIST: Prefixes for binary multiples

BIPM: SI prefixes