USB to SPI adapters with straightforward API and many easy-to-use applications
Connect any SPI chip or module to USB-SPI adapter, install our setup package and you are ready to go. You can use our GUI or command-line applications or write a few lines of code at your favorite programming language to transfer data to and from the external SPI device. No need to learn the low-level of SPI protocol.
- Configurable SPI bus frequency 2kHz-48MHz
- Configurable SPI mode (clock polarity and phase)
- Half-duplex & full-duplex data transactions
- SPI slave reselection between data frames
- Configurable SPI delays
- Configurable frame size 8-16 bits
- SPI bus voltage 3.3V (5V tolerant)
- USB bus powered. Provide up to 350 mA of power to your embedded project
- SPI Multi-master
- Connect multiple SPI slaves. Up to 5 slave select pins are available
- Additional API for SPI flash interface
- ID and serial numbers are accessible from software
- Asynchronous and Event Driven SPI Slave interface
- Free software (downloadable from website)
- Open source examples and demos
- API for C, C++, Python, VB, VB.Net, C# and LabView
- Available as adapters, modules and system on chip
- Upgrades are free and can be easily applied
- Additional Interfaces - I2C, GPIO, ADC, PWM, etc
- Dozens of accessories
- Available for 45 days Test Drive
Features
Configurable SPI bus frequency 2kHz-48MHz
You can connect adapter to any SPI device and adjust the frequency to reach the maximum throughput. The SPI bus frequency is configured with a single function call.
Configurable SPI mode (clock polarity and phase)
SPI specification defines 4 modes of data transmission. They are composed by combination of clock polarity (CPOL) and clock phase (CPHA) parameters. DLN SPI-USB adapters support all 4 modes.
Half-duplex & full-duplex data transactions
Diolan SPI to USB adapter can transmit data to an external SPI device, from an external SPI device or in both directions simultaneously.
Configurable SPI delays
Some SPI slave devices require additional time to process data. You can configure delays at different data transmission stages to fulfill the slave device requirements:
- Delay between data frames
- Delay after slave selection
- Delay between different slaves selections
There are no SPI delays by default.
SPI slave reselection between data frames
Every SPI transmission starts with selecting the slave device. Some SPI slave devices are able to receive large data packages during a single transaction, while others require slave select line to be reasserted for each byte or word of data (data frame).
You can configure the size of data frame and instruct DLN series adapter to reassert slave select pin between frames.
Configurable frame size 8-16 bits
The DLN adapter transmits the data bit after bit via SPI bus. Logically, your application and an SPI slave device treat this data as an array of 8-bit or 16-bit words within single USB frame. Some SPI slave devices (for example, digital-to-analog or analog-to-digital converters) operate even with 12-bit words.
The ability to set any frame size in the available range allows the DLN adapters to support a wide range of SPI slave devices.
SPI bus voltage 3.3V (5V tolerant)
The SPI bus voltage can be supplied either by DLN USB-SPI adapter, or by your hardware. The DLN adapters can supply 3.3V, but DLN-1 and DLN-2 adapters are 5V tolerant, so you can use them in 5V SPI circuits.
USB bus powered. Provide up to 350 mA of power to your embedded project.
The DLN USB-SPI adapters are powered directly from USB. No external power supplies are required. The USB to SPI adapters can also supply power for your hardware. The amount depends on specific device (see comparison table).
SPI Multi-Master
DLN SPI to USB adapters can share the bus with another SPI master device. This is important for rapid testing and debugging of closed SPI system.
Connect multiple SPI slaves. Up to 5 slave select pins are available
The exact quantity of available SS pins depends on specific adapter (see comparison table).
Additional API for SPI flash interface
It is supported only by DLN-4M and DLN-4S adapters.
ID and serial numbers are accessible from software.
Need to interface separate SPI busses simultaneously? You can connect several USB to SPI adapters to the same PC and interface them from the same software. Every adapter is uniquely identified by serial number, assigned during the manufacturing. You can change the ID number from software to prepare similar fixtures with multiple adapters in each fixture.
Asynchronous and event driven SPI slave interface
DLN-4S adapter provide event-driven interface for SPI slave devices. The events are generated when the SPI slave meets the certain predefined conditions. You can preconfigure the SPI adapter to send events after transaction. Polling, that wastes computer resources and bus bandwidth, is not required.
Upgrades are free and can be easily applied.
We are constantly working to add new features to our USB-SPI adapters. The upgrade can be applied without disconnecting the USB-SPI adapter from PC. You can use our firmware update utility (open source) or integrate upgrade into your setup.
Free software (downloadable from website)
The USB to SPI adapters come with a set of easy to use software applications. For SPI interface we provide the following programs:
Configures the SPI master interface, writes and reads data over the SPI bus.
Configures the SPI slave interface, receives data from SPI master device, and logs it.
Logs asynchronous SPI slave transactions as well as events from other interfaces (e.g. digital and analog input pins, pulse and frequency counters, etc.)
Allows configuring the SPI master device and sending SPI transactions from command line or batch file script. Especially useful if you need to combine several I2C transactions as a set.
These applications are free and open source code. You can use them as a starting point for your own software development.
Open Source Examples & Demos
After installing our setup package you’ll get access to dozens open source demos in different programming languages, varying from the simplest to the most advanced.
If you need additional demo or instructions on how to interface DLN USB to SPI adapters from your favorite programming language just contact us. Our engineers and support team will be happy to assist you.
API and Programming
With just a few lines of code you can interface SPI bus from computer.
#include "..\..\..\common\dln_generic.h" #include "..\..\..\common\dln_spi_master.h" #pragma comment(lib, "..\\..\\..\\bin\\dln.lib") int main() { // Open device HDLN device; DlnOpenUsbDevice(&device); // Set SPI frequency uint32_t frequency; DlnSpiMasterSetFrequency(device, 0, 100000, &frequency); // Enable SPI master uint16_t conflict; DlnSpiMasterEnable(device, 0, &conflict); // Prepare output buffer uint8_t input[10], output[10]; for (int i = 0; i < 10; i++) output[i] = i; // Perform SPI transaction DlnSpiMasterReadWrite(device, 0, 10, output, input); // Print received data for (int i = 0; i < 10; i++) printf("%02x ", input[i]); // Disable SPI and close device DlnSpiMasterDisable(device, 0, 0); DlnCloseHandle(device); return 0; }
LabVIEW SPI Library and Examples
The LabVIEW package for USB to SPI adapters includes:
- LabVIEW Instrument Driver
- LabVIEW SPI master and slave components
- LabVIEW examples for SPI master and SPI slave interfaces
- Documentation
You can easily integrate the LabVIEW SPI driver components into any application.
All software examples are free and open source.
Which SPI adapter is right for your application?
Diolan offers many adapters for USB to SPI interface. Below we list the most popular. They differ by form factor, supported frequencies and features. However, they all share the same API and can be easily interchangeable. You would not need to modify your software if you decide to switch to another adapter in the future.
SPI to USB Adapter DLN-4M
The DLN-4M adapter is available in two variations: with enclosure (DLN-4ME) or without enclosure (DLN-4M). It has most of the functionality you need to start interfacing your SPI slave device.
DLN-4M has highest SPI bus frequency parameters (up to 48Mhz) and high speed USB interface (480Mhz). Also you can configure additional SPI delays if your SPI slave device requres such.
The DLN-4ME adapter comes in handy plastic enclosure with rubber sides. Two pin headers are hidden inside the enclosure, so the number of accessible input/output lines are limited to 26 (the 26 pin D-SUB connector). SPI bus, as well as other most popular interfaces (I2C, GPIO, ADC, pulse and frequency counters) are present at this connector. You can easily make an elegant cable (or we can do it for you) to connect DLN-4ME adapter to your hardware. We sell the mating connectors and hoods for it.
USB-I2C/SPI/GPIO Adapter DLN-2
The most popular adapter is DLN-2. This is a middle-price product smd it has all required functionality to start interfacing your SPI slave device.
The SPI lines are available on 2 connectors:
- The dedicated 2x10 pin header SPI connector outputs MISO, MOSI, SCK and SS lines.
- If you need additional signals (I2C, ADC, PWM, GPIO, etc.), you can connect the standard flat cable to 2x40 pin header.
DLN-2 supports SPI bus frequency up to 18Mhz and USB interface up to 12Mhz. SPI bus voltage can be used with 3.3V, but SPI pins are 5V tolerant.
USB to SPI Slave Adapter DLN-4SE
The DLN-4S USB-SPI adapter is based on the same hardware as DLN-4M, but it adds support for SPI slave interface (you can use it with your SPI master device).
The SPI slave interface is asynchronous. You load the data (if you need to send data to the I2C master device); all the remaining work is done by the USB to SPI adapter. It waits for SPI master device to initiate the data transfer. After transaction is finished, your software receives event with data sent by the SPI master.
Additionally you can configure event buffer size, SPI mode, frame size, reply shortage action and mode.
DLN-4S adapter is also available in two variations – with or without plastic enclosure.
DLN-1 PC-I2C/SPI/GPIO Interface Adapter
Our customers use the DLN-1 adapter as a part of their device. This adapter is very small, only 50x40mm.
It’s connectors are not populated, so they can be soldered in a variety of ways. You can also solder the wires directly to the adapter and get the reliable permanent connection.
The functionality of DLN-1 adapter is mostly similar to DLN-2 adapter. The SPI frequency can be set only up to 4Mhz.
USB-SPI Adapter |
DLN-1 |
DLN-2 |
DLN-4M |
DLN-4S |
All 4 SPI Modes Support | ||||
SPI Interface Clock Frequency | 2 kHz - 4 MHz | 2 kHz - 18 MHz | 376 kHz - 48 MHz | 376 kHz - 48 MHz |
Frame Size | Configurable (8-bit to 16-bit) | Configurable (8-bit to 16-bit) | Configurable (8-bit to 16-bit) | Configurable (8-bit to 16-bit) |
Configurable SPI delays (no delays by default) |
||||
SPI Bus Voltage | 3.3V (5V tolerant) | 3.3V (5V tolerant) | 3.3V | 3.3V |
USB Interface | Full Speed (12MHz) | Full Speed (12MHz) | High Speed (480MHz) | High Speed (480MHz) |
SPI Master Interface | ||||
SPI Slave Interface | ||||
SPI Flash Interface | ||||
Additional Interfaces |
|
|
|
|
Additional Interfaces
In addition to SPI interface, DLN series adapters also support:
- I2C master and slave interfaces
- GPIO (General Purpose Inputs and Outputs)
- ADC (analog to digital converter)
- Pulse and frequency counters
- PWM (pulse-width modulation)
- UART
We have many customers that used our adapters to interface SPI device in one project, appreciated how easy it is. Later they used the same adapters in other projects that required additional interfaces.
Embed USB-SPI bridge in your hardware
All DLN series USB to SPI adapters are also available as system-on-chip.
You can significantly reduce your solution cost by embedding chips with our firmware in your hardware.
Our engineers will be happy to assist you during the integration. This way you will get the low cost solution that is fully compatible with Diolan adapters and can be used with the same software and API.
Try USB to SPI Adapters with No Obligation
Test Drive is a unique program offered by Diolan to assist you in evaluating and selecting the best interface adapter for your task. You will have 45-days risk free experience.
If the adapter does not satisfy your requirements, you can either return it back or exchange it to another adapter. The difference in price will be refunded.
Contact Us
Have additional question or can’t find the required information? Contact us by using the form below:
How to Order
Order Online
Products can be purchased directly from our web site. The payment is safe. We don't collect credit card numbers. We even don't know them. All the payments are processed securely by PayPal.
Request a Quotation
To request a quotation add items to your shopping cart. From shopping cart you can click the link "Request a Quotation", specify your shipping address and we will send you the formal quotation.