SCPI commands for SPI/I²C/JTAG/... bus master - Page 1
Forum section: electronics / testgear

author: leonerd
author_rank: Regular Contributor
timestamp: October 31, 2015, 06:53:12 pm
content: 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 masterCan perform IO at 5V, 3.3V, 2.5V, 1.8VCan source a reasonable (up to say 200mA) amount of power at the IO voltageHas some additional GPIO lines, at least one of which is interrupt-capableAdditionally 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 namedSPI,IICandJTAG, 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

author: abyrvalg
author_rank: Frequent Contributor
timestamp: October 31, 2015, 07:45:51 pm
content: FT2232H MPSSE engine does almost all these things in hardware

author: dadler
author_rank: Unknown
timestamp: October 31, 2015, 10:13:10 pm
content: https://www.adafruit.com/products/2264I drive mine with Python scripts, works great.

author: leonerd
author_rank: Regular Contributor
timestamp: October 31, 2015, 10:34:50 pm
content: 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.

author: MarkF
author_rank: Super Contributor
timestamp: November 01, 2015, 01:38:55 am
content: TheDLP-USB1232HorDLP-USB232Rfrom 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.