Prepare Logic 2
- Connect the analyzer by USB and open Logic 2.
- In Logic 2 Preferences, turn on the automation server (the Automation API). Keep the default port,
10430; Embedder connects on that port. - Leave Logic 2 running while you capture.
- Ask Embedder to check the analyzer. The first time, approve the setup prompts:
- Install Python 3? if Python is missing.
- Create Embedder Python environment?
- Install logic2-automation?, Saleae’s automation package.
- Connect ground first, then the signal channels. Check the voltage limits for both the analyzer and the target.
Channel numbers and thresholds
Embedder counts channels from 0. On the Original Logic, the housing labels run from 1 to 8, so housing channel 1 is channel 0 and housing channel 8 is channel 7.
Don’t request a threshold on a model with a fixed threshold; the capture fails. For other models, ask Embedder which rates and thresholds the connected device reports. On the Original Logic, a busy USB 2.0 host can limit the rate to 16 or 12 MS/s.
Embedder captures digital channels only. Use an oscilloscope for analog measurements.
Capture digital traffic
Give Embedder the physical channel map, duration, sample rate, and the activity you expect:
For a manual capture, ask Embedder to start the capture, perform the operation, then stop the capture before exporting it. To run the capture and the operation in a fixed order, put both in one hardware script.
Saleae captures start immediately; there is no trigger option. Start the capture before the event and keep enough margin on both sides.
The connected model and the number of enabled channels determine which sample rates are available. If you request an unsupported rate, Embedder uses the nearest supported rate and reports the change. Check the reported rate before you calculate pulse widths or compare runs.
If several Saleae analyzers are connected, say which one to use. Embedder can list the device IDs Logic 2 sees.
Decode a bus
Embedder decodes with Logic 2’s own protocol analyzers: 1-Wire, Atmel SWI, BiSS-C, CAN, DMX512, HD44780, HDLC, HDMI-CEC, I2C, I2S / PCM, JTAG, LIN, Manchester, MDIO, MIDI, Modbus, PS/2, SMBus, SPI, SWD, Synchronous Parallel, UART (Async Serial), and USB low and full speed. Provide the channel roles and settings for each bus:- UART: data channel, baud rate, data bits, parity, and stop bits.
- SPI: clock and MISO, plus MOSI and chip select when used, and bits per transfer. Clock polarity, phase, and bit order use Logic 2’s defaults.
- I2C: SDA and SCL. The address display setting changes only how addresses are shown.
- LIN: data channel, bit rate, and LIN version.
Save and inspect
Ask for the files you need:- A
.salcapture to reopen in Logic 2. - Raw digital CSV for the enabled channels.
- A decoded CSV for each analyzer.
In a hardware script
In a hardware script, these helpers are available without an import:digital_threshold_volts on the Original Logic and Logic 8.
Troubleshoot
- “No Saleae device detected via USB”: check the cable and USB port, then confirm that Logic 2 shows the analyzer. On Linux, Embedder finds the analyzer with
lsusb; install your distribution’susbutilspackage if that command is missing. - “Saleae Logic 2 is not reachable on port 10430”: open Logic 2, turn on the automation server in Preferences, and confirm the port is
10430. - Python or package setup failed: install Python 3 yourself, then ask Embedder to check the analyzer again.
- Wrong bytes: compare housing labels with channel numbers that start at 0, then check framing, SPI mode, channel order, and bit rate.
- Sample rate changed: Embedder chose the nearest supported rate. Enable fewer channels for a higher rate.
- Threshold rejected: the model has a fixed threshold. Remove the threshold from the request.