Why with the SPI-Box?

A lot of microcontrollers, especially from Atmel, have a Serial Peripheral Interface (SPI) for a quick and simple in system programming. The SPI consists of the following signals:

SPI is a deceptively simple, reliable concept with high data transmission rates (5 MBit/s and more). TTL levels are used. Usually a personal computer delivers the programming data. It is obvious, to use the conventional PC interfaces for emulation of the Serial Peripheral Interface. In most cases, the required level adoption will be realized with diode/resistor networks.

"SPI" can be emulated with all three conventional interfaces of the PC. Now the solutions will be discussed.

Serial Interface

The handshake lines of the serial interface are used, to realize the three outputs and the required input (MISO). The handshake lines are misused as I/O ports. The SPI timing will be realized with the necessary control of the handshake lines. Very high latency times of 40µs and more are given at the change of levels on the lines, especially under Microsoft Windows. The result is a slow SPI transmission rate of about 1 kBit/s. The programming time complies.

The serial interface of the PC has output voltage levels in the range of ±12V. The outputs are short circuit resistant. The output voltages has to be converted to TTL levels. A separate power supply for microcontroller system is required.

USB

Modern PCs always has USB connectors. The serial interface gets rare. A cheap and simple way to extend the PC with a serial interface is the usage of an USB/Serial adaptor. The operating system offers an additional (virtual) serial interface, which can be controlled in the same way as a conventional interface. The conversion principals implies extremely high latency times with SPI transfer rates under 100 Bit/s as the result. In this term, this solution can be rated as unsuitable.

The same circumstances like the conventional interface are valid for the level adoption and the power supply.

Parallel Interface

The parallel interface of the PC is also controlled as I/O port. The required input (MISO) has to be routed over a handshake input, because all data lines works as outputs in the same time. The parallel interface can be controlled without significant latency times. It directly outputs TTL levels. In this term, the parallel interface seems to be the perfect solution.

But the interface isn't short circuit resistant and more sensitive against foreign voltages. A risk of damage is given. The power supply for the microcontroller system has to be realized by an additional voltage source.

The optimal solution with the SPI-Box

The SPI-Box avoids the listened disadvantages of the conventional solutions. It is also connected at the serial interface, but it works in serial mode. The latency time problem isn't present — neither by the use of an USB/Serial adaptor! To get a high data transfer rate, 115200 baud are used. The serial data stream is converted into a SPI conform data stream by a microcontroller inside the SPI-Box.

The SPI connector of the SPI-Box supplies TTL leveled voltages. The outputs are short circuit resistant and protected against high voltages. If nevertheless a damage occures, the appropriate integrated circuits (74LS06 and 74HC14) can be replaced in a simple way. The SPI-Box is supplied with a non stabilized mains adapter. The voltage of this power supply is passed to a second mains plug, to support additional electronic devices. The SPI connector of the SPI-Box supplies a regulated voltage of +5V. It can be used for a direct supply of microcontrollers.

The advantages in the overview:

Like the conventional solutions, the SPI-Box needs a PC software for control, of course. A software package is available for Microsoft Windows®. Especially the "SPI-Box Software Enhanced Edition" supports a number of microcontrollers and it contains application samples, which demonstrates, how to program SPI EEPROMs and peripheral devices. The main item of all applications is a library file, which is appropriate for the connection to the SPI-Box. The interfaces of the library file are documented.  Users with programming knowledge are able, to develop here own applications for the SPI-Box. The enhanced software package contains examples and programs with source (Borland Delphi 6).

(c) Reusch Elektronik

back
enhanced software package
printed circuit board rev. 2.0
Firmware V2.0