What is the best way to send SPI,I2C, etc. messages from PC (for testing)? - Page 1
Forum section: electronics / projects

author: Miyuki
author_rank: Frequent Contributor
timestamp: May 19, 2022, 06:11:05 pm
content: Hi folks.I'm using a USB Saleae logic analyzer (a cheap clone works well as I work mostly on slow stuff up to 1MHz) and it is a great tool when developing.I want to ask if you have any experience with something that can do another way. To have a nice environment on PC and can send custom messages or reply over SPI, I2C, and others.I know there are chips like FT2232HL, that can do the hardware part, but is there some nice software?Or how do you deal with this issue?

author: oPossum
author_rank: Super Contributor
timestamp: May 19, 2022, 07:30:38 pm
content: Bus Pirate can do it.http://dangerousprototypes.com/docs/Bus_Piratehttp://dangerousprototypes.com/docs/Features_overview

author: RoGeorge
author_rank: Super Contributor
timestamp: May 19, 2022, 07:58:50 pm
content: Try sigrokhttps://sigrok.org/wiki/Main_PageIt can stack decoders, compatible with many logic analyzers and many lab instruments, has both command line and GUI, I don't know if it can also transmit.

author: Hawaka
author_rank: Regular Contributor
timestamp: May 19, 2022, 07:59:57 pm
content: I have been using this at work, software is pretty easy to use. But I do think it is quite expensive for what it is.https://www.totalphase.com/products/aardvark-i2cspi/Also I would strongly recommend getting an USB isolator15$ to protect your PC and dongle is a little price to pay and definitely worth it.

author: tooki
author_rank: Super Contributor
timestamp: May 19, 2022, 09:34:59 pm
content: Quote from: Hawaka on May 19, 2022, 07:59:57 pmI use the Aardvark at work, too, and find it very useful, but indeed, quite expensive.I bought some $6 USB-I2C interfaces (eval boards for a converter chip) which have demo software (including source code) available. It works… ish. It’d probably take a skilled desktop app programmer a day to write something to do interactive bus communication, and maybe a week to flesh it out with scripting like thr Aardvark software. Alas, I’m not that person…

author: bgm370
author_rank: Contributor
timestamp: May 19, 2022, 11:06:47 pm
content: Pyftdi is quite powerful for these kinds of tasks. I successfully used it to communicate using i2c, spi and jtag in various situations.

author: tooki
author_rank: Super Contributor
timestamp: May 24, 2022, 08:02:49 pm
content: But is there a GUI for it? I kinda assume that’s what the OP means.

author: jeremy
author_rank: Super Contributor
timestamp: May 24, 2022, 11:36:24 pm
content: I made a device to use which does exactly this:https://github.com/jeremyherbert/polyglot-turtle-xiao- I use it practically every day for little automation tasks. Well, really it is a firmware for the ~$5 seeeduino xiao, I wanted to avoid manufacturing anything myself.It basically just connects over USB, and then you install the python library with pip:https://github.com/jeremyherbert/python-polyglot-turtle. No PC drivers are required (although you need to tweak udev permissions on Linux as usual). Python usage is very simple.There are examples on the GitHub page for SPI, I2C, PWM, DAC, ADC and GPIO, and it also exposes a USB to UART converter which shows up as a serial port in the PC. Works on any platform you can install python on.

author: Bassman59
author_rank: Super Contributor
timestamp: May 25, 2022, 04:35:31 pm
content: Quote from: tooki on May 19, 2022, 09:34:59 pmOne more vote for Aardvark, they work as advertised.

author: MadScientist
author_rank: Frequent Contributor
timestamp: May 25, 2022, 04:41:26 pm
content: Try i2cdriver.comBoth i2C and spi come with command line and GUIs that let you send i2C or spi commands