Instruments4Chem

High Performance, Low Cost…

The XMOS Startkit


XMOS is a UK-based company that offers processor chips with one or more logical cores that each support multi-threading.

The XMOS Startkit pictured below is a very low cost development board suitable for experimenting with an XMOS processor chip. This is programmed in XC, a special implementation of C with added instructions to make use of the on-board I/O and timers.

Code development is carried out in an integrated development environment (IDE) called XTIME Composer. An excellent Simulator tool is also accessible from within the IDE - this is extremely useful when checking user code that uses the I/O ports - for an example see here.
Headers can be soldered onto the Startkit PCB to access power, numerous I/O pins and a 4 channel 1MHz, 12 bit ADC. On the PCB these headers are labelled J7, J8, GPIO and ADC.

Power (5V and 3.3V) and GND are also available on another header (J6) for use by external circuitry. The pinouts for these connectors can be found in the Startkit hardware reference manual at the XMOS website.

To download and launch executables or to program the on-board flash memory the user's PC initially connects to the XMOS Startkit PCB via the micro USB connector visible at the top left of the PCB. Once a program has been flashed into the XMOS processor, this PC connection is actually no longer required but power still needs to be applied here (this could be from a phone charger, for example).

In XMOS projects described on this website, custom shields have been designed that ride piggyback on the Startkit. These shields have male header strips soldered in that mate with female sockets soldered onto the Startkit.

Every shield also has a 3 pin header located in its upper left hand corner. A USB-to-TTL-cable (TTL-232R-3V3-WE) made by Future Technology Devices International Ltd (FTDI) plugs in at this header to enable data transfer between the XMOS Startkit and a PC running LabVIEWTM. A diagram showing the wire end connections of the FTDI cable and noting their destination pins on the 3 pin header can be found at the bottom of this page.

A list of custom XMOS StartKit shields (with brief descriptions) that I’ve developed appears below. Many of these shields were conceived after similar Propeller-based instruments had become operational, and all are controlled by a LabVIEWTM graphical user interface, giving the instrumentation a professional look and feel.

Don’t be fooled by the very low cost (< US$15) of the XMOS Startkit - it has plenty of horsepower to provide the nucleus for a sophisticated instrument ! A case study will be described below in which a Startkit controls a 2D imaging system being used for spectroscopy, with just a handful of additional components.

XMOS Startkit Instrument Shields

Stacks Image 4870
ILX511 CCD Detector Shield
This shield provides clock signals for a linear CCD and has analog electronics to acquire video pixel data into a memory buffer on the XMOS StartKit.
Stacks Image 4871
Photon Counting Shield
A shield using a time-to-digital converter to measure the precise time interval between a pair of start and stop pulses with 100 psec time resolution. Can be integrated into a fluorescence lifetime spectrometer, as described here.
Stacks Image 4872
Polarimeter Shield
This shield adds an L6470 micro-stepping controller to run a stepper motor and an LTC1865 ADC to measure the light intensity in a low cost polarization analyser, as described elsewhere. A simple polarimeter implementation using an XMOS Startkit.
Stacks Image 4879
Galvanostat Shields (2)
These shields are used for sensitive, trace metal analysis. Metals such as Pb, Cd, Zn, In, Tl and Sn can all be measured in a single experiment at the low ppb level. See here for further details.
Stacks Image 4882
Piezoelectric Micropump Controller Shield
A shield providing the capability to drive 2 x Balters MP6 piezoelectric micro pumps, control a 6-port injection valve and read light intensity from an optical detector. Useful for flow injection style experiments as seen here.
Stacks Image 4885
High Speed 8 channel, 16 bit ADC Shield, with 1MB SRAM
An 8 channel data acquisition shield (data rates up to 200 kHz) for the XMOS Startkit using the LTC1867 ADC. An on-board 1Mx8 SRAM chip (Renesas R1LV0808) serves as buffer memory while collecting data.
Stacks Image 4888
24 bit ADC Shield, with 1MB SRAM
A single channel data acquisition board using the Linear Technology LTC2440 chip. The extremely low noise of this IC enables it to easily and reliably measure low millivolt and microvolt level signals. An on-board 1Mx8 SRAM chip (Renesas R1LV0808) serves as buffer memory while collecting data.
Stacks Image 5101
Data Acquisition Shield with 2MB SRAM, SD Card and IDC Header that Interfaces to Linear Technology ADC (DC845A) and DAC (DC579A) Evaluation Boards
The SD card slot on this XMOS shield allows the user to store or retrieve large amounts of data. A large SRAM space (2MB) is also available for data storage. An 8 pin IDC header breaks out digital signals to control various low cost Linear Technology data acquisition boards.
Stacks Image 5089
pH Sensor Shield
A shield using the Texas Instruments LMP91200 pH sensor chip. This allows the user to take accurate pH readings that are compensated against changes in temperature.
Stacks Image 5439
Low Cost, Multi-Channel ADC Shield
The MCP3903 is a low cost ADC with an internal voltage reference and 6 simultaneously sampled data converters providing 16/24 bit resolution. The data rate is programmable up to 64 ksps.

Stacks Image 5442
Time-to-Digital Converter Shield
This shield incorporates a Texas Instruments TDC7200 chip. Intended primarily for ultrasonic sensing applications, the TDC7200 performs time interval measurements in one of two modes, the first providing a range from 12 ns to 500 ns, and the second from 250 ns to 8 ms. Time resolution is 55 ps.
Stacks Image 6305
High Performance Data Acquisition System
An XMOS shield incorporating a large amount of data storage, via an SD card slot and an 8 MB HyperRAM chip. Various Linear Technology analog I/O boards can be connected via an 8 pin header, offering the user many options for data acquisition and waveform generation applications.

Case Study - Implementing a Complex 2D Imaging Application using an XMOS Startkit Board

The XMOS Startkit is an extremely versatile and powerful development platform. To illustrate just how much one can accomplish using a Startkit, i’ll describe a scientific imaging system I’ve developed using a SITe STA-001A CCD imager chip . This chip, which has a rectangular format of 330 rows each having 1132 pixels, 24 μm square, was removed from equipment obtained on the surplus market that had been used in mapping the human genome. The imager itself is packaged in a hermetically-sealed housing allowing it to be thermoelectrically cooled to lower the dark signal.

More details on my original SITe imager can be found here. A seen in the photo, that earlier design had the imaging chip mounted on the upper PCB while the lower PCB housed a Dallas Logic FPGA board plus RAM and a USB-to-serial interface to manage all data acquisition functions. The goal of the present project was to completely replace the lower PCB in my earlier design with an XMOS Startkit-based solution. Let’s investigate the feasibility of this proposal.

Assuming a 16 bit ADC is used during image acquisition, a total of 747,120 bytes of RAM would be required to hold a full image – clearly far more than the 64k on-board the Startkit. Addition of a byte-wide 1MB external SRAM could be considered but this would consume 20 I/O pins for an address bus and a further 8 bits for the data bus, leaving almost no I/O for the ADC and for the clock signals needed to read out an image.

To overcome this problem, the XMOS Startkit imager shield and supporting code I’ve implemented runs three parallel tasks – one to manage USB transactions to a host PC, a second that performs the image acquisition and a third that writes/reads data to/from a micro SD card.

In the multi-task scheme I’ve implemented just two small buffers are needed – one buffer captures a single row of pixel data while the other buffer is written to the SD card. Pointers to these buffers are then swapped after each such operation as an image is being read out. Exactly the same method is used in the “double buffering” example found in the XMOS programming examples manual.

In practice, the SD card file I/O routine can write a single row of 2264 bytes in just a couple of milliseconds, meaning that a full 330 row image can be acquired in well under a second. Optimum performance is realized when SD card writes occur in blocks of 512 bytes and hence 5x512=2560 bytes are actually saved during each write operation, with the extra 296 bytes being discarded during high level processing.

If desired, the image area can be subdivided into a smaller number of rows by merging blocks of rows into a “super row” via a technique known as parallel binning – this gives more optical sensitivity and higher readout speeds at the expense of spatial resolution.

The XMOS Startkit solution I’ve developed makes use of almost all of the available I/O resources on-board.

Video data is captured by an Analog Devices AD9826 - a 16 bit correlated double sampling (CDS) chip that interfaces to the XMOS Startkit using 11 I/O lines – an 8 bit data bus and three control signals.

A further 8 I/O lines are used to clock the imager’s serial register and control the CDS functionality built into the AD9826. Another 4 I/O lines are used for the parallel clocks that are used by the STA-001A to shift each new pixel row into the serial transfer register.

The SD card interface uses another 6 I/O lines.

Finally, a digital control signal is also provided to control an external electronic shutter so that the sensor can be covered during the readout phase.

Consequently, a total of 30 I/O pins on the Startkit are utilized to construct the interface.

Once an image has been acquired and saved into a file the stored data is then read back and uploaded to the PC – this latter operation is handled by the USB task. A third data space (16k bytes) was allocated to serve as an intermediate transfer buffer during this phase of operations, prior to communications (reliably performed at 2 Mbaud) back to the host PC. Interface messages occur back-and-forth between the USB task and the file I/O task as 16k chunks of data flow from the SD card to the host until the full image has been acquired.

Image acquisition and display is managed by a LabVIEWTM vi giving the user full control of gain, offset, image format settings and exposure time, all from a user-friendly graphical interface (GUI).

The total cost of the SITe imager shield described here and including the Startkit board is ~ US$25, yet the solution is capable of managing this complex image acquisition task with ease. In addition to a much lower parts cost, programming in XC is also much easier than writing Verilog code for an FPGA.

The photo below shows the XMOS_SITe breakout shield developed for this application, and plugged into an XMOS Startkit. The SD card is visible at left, as are three indicator LED’s. A 26-way ribbon cable brings signals from the Startkit up to the 96-way card edge connector that plugs into a corresponding connector on the imager PCB. The additional headers seen just below the edge connector are for TEC (thermoelectric cooling) power and for numerous power rails (the IDC20 connector) that are needed for the imager’s serial and parallel clocks.

A description of the LabVIEWTM front panel that operates the XMOS Startkit SITe imager can be found here.

Another low cost, imaging acquisition solution (again employing employing an XMOS Startkit board) but this time using a HyperRAM chip for data storage is described here.
FTDI USB-to-TTL cable to XMOS Shield Connections

The diagram at left shows the TTL-232R-3V3-WE cable with its USB terminations (left) and their matching wire ends (right). It is essential that this cable (and not the 5V variant) be used with the XMOS shields shown above.

There are 6 wire-ended terminations on the FTDI cable of which only three (black, orange and yellow) are used in connecting to the header located in the upper left hand corner of the XMOS shield. In the preceding photo this header can be seen immediately above the SD card connector and is in a similar location on all of the XMOS shields.

Proceeding from left to right the wire end connections to the 3 header pins go in the order yellow-orange-black. The other three wires (brown, red and green) are left unconnected and can be clipped off.