Author Topic: What is the best way to send SPI,I2C, etc. messages from PC (for testing)?  (Read 1567 times)

0 Members and 1 Guest are viewing this topic.

Offline MiyukiTopic starter

  • Frequent Contributor
  • **
  • Posts: 907
  • Country: cz
    • Me on youtube
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?
 

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1417
  • Country: us
  • Very dangerous - may attack at any time
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6203
  • Country: ro
Try sigrok https://sigrok.org/wiki/Main_Page

It 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.

Offline Hawaka

  • Regular Contributor
  • *
  • Posts: 97
  • Country: ch
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 isolator ;) 15$ to protect your PC and dongle is a little price to pay and definitely worth it.

 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11536
  • Country: ch
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 isolator ;) 15$ to protect your PC and dongle is a little price to pay and definitely worth it.
I 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… :(
 

Offline bgm370

  • Contributor
  • Posts: 14
  • Country: us
Pyftdi is quite powerful for these kinds of tasks. I successfully used it to communicate using i2c, spi and jtag in various situations. 
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11536
  • Country: ch
But is there a GUI for it? I kinda assume that’s what the OP means.
 

Offline jeremy

  • Super Contributor
  • ***
  • Posts: 1079
  • Country: au
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.
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
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 isolator ;) 15$ to protect your PC and dongle is a little price to pay and definitely worth it.
I use the Aardvark at work, too, and find it very useful, but indeed, quite expensive.

One more vote for Aardvark, they work as advertised.
 

Offline MadScientist

  • Frequent Contributor
  • **
  • Posts: 439
  • Country: 00
Try i2cdriver.com

Both i2C and spi come with command line and GUIs that let you send i2C or spi commands
EE's: We use silicon to make things  smaller!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf