Post 4

“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”

Post 3

“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”

Post 2

“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

FreeRTOS port for XMOS XS1 processors

I have ported FreeRTOS to the XMOS architecture.

The project can be downloaded from the project page on the XCore website. This page will always hold the newest release of the port.

A mirror for the current release can be found here.

Converting video for my DVD player

The movies i shoot with my digital camera have to be converted to play on my TV using my DVD player (using the USB functionionality of the DVD player).
My DVD player accepts video encoded in DivX and audio in MP3. The movies shot by my digital camera are encoded using Motion JPEG and the audio is PCM (yes even PCM is not supported!)

Digital camera output format

Digital camera output format

To convert the video to DivX and MP3 i use the following tools:

Before converting make sure the DivX codec is installed.

Converting video’s is done in two steps:

  1. Converting the audio to MP3
  2. Converting the video to DivX

This could be done with VirtualDub only but for some reason i could not encode the audio to MP3 (using the default Fraunhofer MP3 codec which is installed on Windows). I also tried the Lame MP3 codec without results. The codecs show up when you select the audio compression but you have to check the ‘show all formats’ checkbox to see the different output modes.¬† If they don’t show up without checking it (in my case), encoding will not work.

I have installed WinFF, which is a frontend for ffmpeg but also installs ffmpeg.

The first step in decoding is converting the audio to MP3. This is done using ffmpeg on the commandline:

C:Program FilesWinFF>ffmpeg.exe -i input.avi -vcodec copy -acodec libmp3lam
e -ar 11025 output.avi

This will convert the audio to MP3 with a output sample rate of 11.025KHz (the same as in the input file) and will not touch the video stream (just copy it).

After that start up VirtualDub and open the video file  (File->open).
VirtualDub might give a warning that the audio has a variable bitrate. If it does we will also rewrite the MP3 stream. First we are going to change the video codec. Make sure that Video -> Full Processing Mode is selected. After that go to Video -> Compression…

A popup will apear with the video compression options.
Select DivX Codec from the list. To change any options, click configure.
In my case this was not nessesary. Finally click OK.

VirtualDub Video Compression Options

VirtualDub Video Compression Options

If VirtualDub gave a warning that the audio has a variable bitrate we also change the audio.

Make sure Audio -> Full Processing Mode is selected (not by default).

Click Audio – > Compression…

A popup will apear with a list of codecs. Select ‘MPEG Layer 3′ and select one of the output formats in the list at the right. Hit OK when done.

VirtualDub Audio Compression Options

VirtualDub Audio Compression Options

Now we can start converting the file.

Click File -> Save as AVI… and start converting…

Result after converting

Result after converting

Simple Minix 3 driver

I have made a simple driver for Minix 3 (Tested on Minix 3.1.4, should work on 3.1.5).
This driver controls the caps lock led by writing: write a 0 to /dev/capslockled to turn it off and a 1 to turn it on. Note: this driver is not thread safe as it might interfere with the TTY driver.

The driver can be downloaded here.

OpenLaserFrag Base System PCB designs finished

I have finished the designs for the OpenLaserFrag Base System modules.
20 set’s of PCB’s are ordered.
The design files will be published as soon as the PCB’s arrive.

OpenLaserFrag Base System PCB's

3.5″ TFT module driven by XMOS processor

I have recently bought an 3.5″ TFT module (18 bit, 262K colors) from ebay. The TFT display is mounted on a PCB with all data lines fanned out to 0.1″ connectors. The display is (i think) a Crystalfontz CFAF320240F-T-TS (datasheet). The display has also a touchscreen.
The PCB has a SPI touchscreen controller, SD card holder and place to solder a SPI flash chip.
The LCD controller is a Solomon SSD2119 chip.

You can interface the display using a parallel 8080-series bus using either 8 or 16 bits or SPI using 3 or 4 wires.
This is limited by the PCB, the controller can also do 9/18 bit parallel 8080-series bus and 8/9/16/18 bit parallel 6800-series bus.

I have hooked this display up to my XMOS XC-1 development board and i am using the 16 bit 8080 interface.
The controller starts up in 16 bit mode (65K colors). I am currently still using this mode as it is way more efficient than the 18 bit mode because i am using a 16 bit parallel bus. My initial code can refresh the display with about 50FPS. My code is nowhere near mature at the moment and i am planning to write a driver for it, which i will publish later.

color test

color test

Video playback on Nokia 6100 display

Using a XMOS processor and a FTDI vinculum embedded USB host chip i have managed to play video on a nokia 6100 (knockoff) display with a frame rate of 16.66 FPS.

Playing 2012 trailer at 16.66FPS (the RAW file was created for 12FPS and thus the movie plays a little bit too fast):

Playing Family Guy at 16.66FPS

I have converted the video to still images and converted them to a 12 bit RAW format.
The RAW file is uploaded to an USB stick with FAT16 file system.

The FTDI vinculum chip can reads from the USB stick and also implements the FAT16 file system, so the XMOS processor can easily open and read/write files without having to take care of the file system or USB stack.

The concept of the FTDI vinculum is very good, only the implementation could be a lot better.
The vinculum chip is in fact just a microcontroller with special USB hardware and runs a firmware.
There are several firmwares available for somewhat different functionality.

Unfortunately these firmwares (I only used the VDAP firmware though) aren’t that stable.
For example the SPI interface seems to have a bug which makes it totally unusable.
I have been able to read from the SPI interfaces but when i try to write to it the device locks up.
How do i know that the device locks up? Normally if you remove or add an USB device (USB stick) it will write a message to the transfer buffer that can be read. However when it locks up it does not responds to removing/adding a device and you will not read any new data.

Luckily the chip has two more interfaces: UART and parallel.
They both seem to work as expected. I have used the parallel interface because it can have higher transfer rates (The UART is limited to 3Mbit/sec).

Now the vinculum chip has two different protocols: a human optimized ASCII protocol (extended command set) and a machine optimized ‘binary’ protocol (short command set). Unfortunately this machine optimized protocol isn’t that machine friendly at all and in fact is just a shortened ASCII protocol.

Unfortunately my code is nowhere near mature so i won’t publish it at this moment.
Besides that the vinculum chips is limited to about 400KB/sec (good for 16FPS with 25KB RAW frames).
I think a SD card will be a better solution to play video from a RAW format.