0 comments Thursday, December 3, 2009

I've recently worked on using XBee(Zigbee) modules for doing wireless communication with the XMOS XC-1 development board. As you may have noticed on the photo, I'm using Arduino breakout boards. These do the  voltage conversions from 5 to 3.3 Volt. One of them is directly connected with the XC-1 using a breadboard. The other one is plugged in an empty Arduino board. Its jumpers are placed to USB mode to enable direct IO with my PC.



On the XMOS chip runs a program which allows to set the clock leds to different shades of orange (varying from red to green actually). Therefor it reads commands from the XBee module, logically being 'r' and 'g'. In the video below you can see how it looks like:







This is how it works behind the scenes:



On the PC side, the XBee module appears as a serial device thanks to the FTDI chip on the Arduino board. When typing a command ('r' or 'g'), it is automatically sent in ascii by the XBee. The other module receives it and sends it to the XMOS chip. This one supports 10 colors ranging from green (value zero) to red (value 10). When the XMOS chip gets a command it will calculate the new value and send it back to the PC via the wireless connection.
The XMOS chip will drive its red and green leds according to the value mentioned above. For example, value 4 means that red will be on for 4 ms and green for 6 ms, creating a shade of orange.

0 comments Wednesday, November 18, 2009

This week I've given a presentation at my university. The main topics were the XMOS XS1 hardware and XC. With two small examples I show how the special hardware can be programmed using XC.

0 comments Monday, October 19, 2009

The hardware

I received my XC-1 dev kit recently. It came in a nice plastic box which reminds me most of an old VHS tape box. Anyway, its content is way more exciting. It contains the board with XMOSes XS1 chip (plus a usb cable and a quickstart guide).



On front of the red multilayer PCB shines the XS1 chip surrounded by a "clock" of 12 red/green leds. Next to it there are 4 pushbuttons with accompagning leds and a buzzer. Own periferal hardware can be added using the four expansion ports and a prototype area. The backside is a less exciting: two oscillators, a usb connector and an FTDI chip are found there. The FTDI chip makes the XC1 show up with 2 serial ports on my system. If you want more details about the board, they are all nicely explained in the "XC-1 Hardware Manual"




The board is powered through the USB port only, so no need for an extra power supply. Connect it to your computer and it immediately comes alive with a nice demo on its "led clock". There are four other demos provided: a clock, a simple audio synthesizer a reaction game and an uart demo.




Getting started

After the demos, it's time to set up the development environment. The provided Quick Start Guide contains a nice step-by-step walktrough to get started. It covers Windows, Mac and Linux.
Installing the toolchain on linux isn't hard either. It basically comes down to downloading it from the XMOS website and extracting the tar file to your home directory. You shouldn't worry about the "compatible with Redhat 4.6" on their site.



The IDE is Eclipse based, so chances are that you'll feel at home immediately. Everything is nicely integrated. But if you really want you can also use the seperate tools from within a terminal.


The project

This project is an entry for the XMOS Challenge. The goal of it is to port the in-house developed Scheme interpreter to the XMOS architecture. It will be possible to use it for rapid prototyping or for educational purposes. All XC specific features should be usable directly from Scheme. That way, it can be used to learn and experiment with advanced multicore architectures without having to worry about low level problems. After porting is completed, some programs will be written using the Scheme environment.

As an intermediate step, Pico will be ported first. Pico is a small derivative of the aforementioned Scheme interpreter.