Author Topic: SCPI commands for SPI/I²C/JTAG/... bus master  (Read 2784 times)

0 Members and 1 Guest are viewing this topic.

Offline leonerdTopic starter

  • Regular Contributor
  • *
  • Posts: 167
  • Country: gb
SCPI commands for SPI/I²C/JTAG/... bus master
« on: October 31, 2015, 06:53:12 pm »
I'm not quite sure if this is the best category for question, but I'll ask it anyway:

I'm intending to make myself a bit of test equipment for acting as a bus master for SPI, I²C, maybe JTAG too, possibly extensible with a few other bits and pieces. I own a Bus Pirate, but I find it's not really up to this kind of task (see below for my reasons). The rough idea of thing I want to make is:

  • Can act as an SPI, I²C or JTAG bus master
  • Can perform IO at 5V, 3.3V, 2.5V, 1.8V
  • Can source a reasonable (up to say 200mA) amount of power at the IO voltage
  • Has some additional GPIO lines, at least one of which is interrupt-capable

Additionally I'll probably build it up into a fully-cased project with a front panel, some LEDs and buttons there too; that sort of thing...

I've recently been playing with using SCPI to control a scope or bench PSU, and I'm finding I rather like the idea. I start to wonder now, whether there's anything in an SCPI standard somewhere that would be suitable for this? The power supply output would look and feel just like another power supply over SCPI, but what about the GPIO lines, the interrupt input, and most of all, the actual synchronous serial SPI/I²C/JTAG bus?

I know I could just invent some commands, that are probably named SPI, IIC and JTAG, but is there anything that already exists that I should be following?



The Bus Pirate more of a toy really. Things I dislike are:

  • It's intended for human interaction on the text terminal, with any sort of binary IO for programming purposes very much a second-class citizen. You can technically write programs that talk SPI or I²C via it, but in my experience the firmware is quite buggy and prone to locking up or missing commands.
  • Having to squash everything down to 57600baud UART really slows down what would be a nice 4MHz SPI transfer.
  • The device can technically act as a power source, but it has no programmable voltage selection and no current metering.
  • Only one spare GPIO pin with no interrupt ability
 

Offline abyrvalg

  • Frequent Contributor
  • **
  • Posts: 836
  • Country: es
Re: SCPI commands for SPI/I²C/JTAG/... bus master
« Reply #1 on: October 31, 2015, 07:45:51 pm »
FT2232H MPSSE engine does almost all these things in hardware
 

Offline dadler

  • Supporter
  • ****
  • Posts: 851
  • Country: us
Re: SCPI commands for SPI/I²C/JTAG/... bus master
« Reply #2 on: October 31, 2015, 10:13:10 pm »
https://www.adafruit.com/products/2264

I drive mine with Python scripts, works great.
 

Offline leonerdTopic starter

  • Regular Contributor
  • *
  • Posts: 167
  • Country: gb
Re: SCPI commands for SPI/I²C/JTAG/... bus master
« Reply #3 on: October 31, 2015, 10:34:50 pm »
I am fully aware of the FT232H. In fact I have one.

It does not have the ability to source 3.3V, 2.5V or 1.8V. It only talks 3.3V on GPIOs, not 5 or the others. It does not have a current monitor. It cannot perform a USB interrupt transfer on interrupting conditions on the GPIO lines. It is not a finished solution in a box ready to sit on the workbench.

It might however be *part* of one. However, given it talks its own USB protocol to the computer and not USBTMC, it won't be able to handle SCPI commands.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2647
  • Country: us
Re: SCPI commands for SPI/I²C/JTAG/... bus master
« Reply #4 on: November 01, 2015, 01:38:55 am »
The DLP-USB1232H or DLP-USB232R from DLP Design may meet your needs.  They have a number of USB interfaces.  I bought their DLP-2232PB-G USB Adapter many years ago and it works very well.  However, it's expensive since the Arduino has been developed.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf