WiCa 1.1 Follow-Me assignment

News

December 13, 2007

Added the datasheet of the camera module.

December 6, 2007

Added the working ZigBee WiCa example!

December 4, 2007

Updated the assignment description, solved the broken link to the WiCa board picture, visually updated chapter three and fixed some problems related to the file links.

December 1, 2007

Website on air with installation guide and assignment formulation. A working example which makes use of the ZigBee module will follow.

Table of contents

  1. Introduction
  2. Getting started
  3. First communication with some sample programs
  4. The assignment
  5. Contact

1. Introduction

Welcome to the homepage of the WiCa assingment for the 5KK70 course Platform-based design. The purpose of this assignment is to get familiar with programming the SIMD Xetal chip which is placed at the WiCa board, which contains 320 Processing Elements. This IC3D IC is specificly designed to perform pixel processing on line based video data. It is a highly parallel SIMD machine and thus low-power. The maximum performance of this processor is about 50 GOPS. WiCa stands for Wireless Camera which is developed by NXP and Philips and they now are developing version 1.2 of the board. We are going to work with version 1.1, see the picture. Also, in this document, you will find an overview of both sides of the WiCa board, displaying all the components which include two connection sockets for color VGA cameras (sensor 1 and 2) and an Aquis Grain ZigBee module interface, which is used for wireless communication with other WiCa boards or a PC. This page contains instructions on how to get started, lets you play with the WiCa board with some nice examples, describes the assignment and gives links to several documents with information about the WiCa board and its components.

WiCa 1.1 board (note: the ladybird is optional)

[Go to the top]

2. Getting started

Introduction

First of all, you must print out and sign this non-disclosure agreement which will declare you not to distribute or use the software programs and kernel code for other purposes than for this assignment. After the assignment is done and graded, you are kindly requested to remove all the tools and programs of the WiCa board. Hand in this signed paper to the secretary at the ninth floor of the Potentiaal building. In case you forgot to bring the signed NDA with you, they also have this document printed for you so then you can there fill it in right away.

Then, you are told in which room at the ninth floor you can find the WiCa setup; i.e. the WiCa board with attached display, power supply and USB cable. Also you will receive the DVD with the software and manuals for the WiCa board.

Note that we have just 4 WiCa boards; 2 with and 2 without an attached LCD display. Therefore it's convenient to first simulate your program local at your computer with a picture as input image. You will need to install Perl to make use of some conversion-scripts. Also it's recommended that you install a certain image viewer/converter to convert your pictures to the desired format and to view the outcome of the simulation. These installation steps will now be described.

Installing WiCa Software and Documentation

Run the self-extracting file to automatically install the software and documentation in C:\WiCa (which is needed to not voilate the path names in some scripts). After you have done this, all the links to the software and the documentation at this website should work. It is recommended that you place the map "C:\WiCa\XTCC" in your Path environment to compile and simulate your programs in every map you want at the Command Prompt; do this by going to System properties - Advanced (system settings) - Environment variables and add this map to the "Path" variable.

Installing Perl

Installing this package will require about 80 MB of hard disk space. Go to the website http://www.activestate.com/store/activeperl/download/ to download the free ready-to-install Perl distribution. You do not need to fill in your contact details. A direct link to the standard Windows (x86) distribution can be found here (right click the link and choose "Save target as"). After downloading, unzip the file and start "installer.bat". After answering all questions, Perl should now be installed. It is important that the Perl\site\bin and the Perl\bin maps are in the Path environment; you should check this by going to System properties - Advanced (systems settings) - Environment variables and verify if the "Path" variable includes this 2 maps. If it doesn't, add them.

Installing IrFanView

Now, it is recommanded that you install a PPM image viewer and -converter for simulating your program. Therefore, download the free tool from this site and install it. It is recommanded that you install it in the default Program Files map (because some scripts have links to this map and otherwise won't work anymore). This tool needs about 1.4 MB of free hard disk space. After installing this program, you should be able to convert every image type to the desired .ppm format. Also, after simulating your IC3D program, this tool is called to display the outcome (which is a .ppm file).

Connecting the WiCa board and the ZigBee USB module to your laptop

Do not connect the WiCa board or the ZigBee USB module to your laptop and do not power up the display yet. The first thing you have to do now is reading this WiCa driver installation manual. After you understood the installation steps, connect the USB cable to a free USB port at your laptop and install that WiCa driver. After that, connect the ZigBee USB module to your computer and make sure the driver and all communication settings are correctly installed and set up. After succeeding in this, you are ready to communicate with the WiCa board by means of the USB cable and the wireless ZigBee module!

Read the documentation

First of all, it is worth mentioning that some of the documentation files are not finished or final yet. Nevertheless, the following documents are available to read.

Recommended readings are denoted with an asterisk. Due to security reasons, it may be the case that your browser doesn't allow local files to be opened from this webpage. To solve this problem, open the local documentation.html file in the Documentation map. The datasheet of the camera module can be found here.

WiCa board (in map Documentation)

XTCC2-IC3D compiler/assembler/simulator for Xetal3D/IC3D chips (in map XTCC\Documents)

[Go to the top]

3. First communication with some sample programs

Introduction

You should now be ready to make your own programs, simulate them and program them in the IC3D chip at the WiCa board. To check if everything works as it should be, let's first start the integrated environment to communicate with the WiCa board.

Communication with the WiCa board

Make sure a camera device is placed in the sensor 1 socket of the WiCa board. Then, connect the WiCa board to your PC with the USB cable, turn on the power supply of the LCD display and run WiCaEnv.exe from the WiCaEnv map. Select the COM port at which your WiCa board is mapped and press the "Reset" button. Now, the WiCa board is in demo mode and you should see the output of the camera with some moving colored blocks at the LCD display. Also you must see the kernel version and the main menu options of the WiCa board in the WiCaEnv program. If not, make sure the "Screen" output option is selected and that you selected the right COM port (with the right settings as discussed). See the screenshot of the WiCaEnv program below. Beware to always first close the WiCaEnv program before unplugging the WiCa board and not vice versa !

Screenshot WiCaEnv program (USB cable)

Compilation and programming IC3D on the WiCa board with an example

Now, we are going to compile and program a sample program. Go to the Command Prompt and change the directory to "C:\WiCa\XTCC\Examples\Movement detection". In this map, a moving object detection sample program is presented. To compile this file, type: "go movement_detection" (without extension). It can give some warnings of variables which are never used, but this can be ignored. The compilation should be succesful. If Windows coudn't find the "go" batchfile, make sure the "C:\WiCa\XTCC" map is included in your Path environment (as discussed above). Now, the compiler has made an assembly file and a hex file. The hex file is the one we need to program, so go back to the WiCaEnv and click at the "open" button (the three dots) at the right of the IC3D box. Now, search for the just made hex file and open it. Then, click "Program", at the right of the IC3D box (make sure you don't click at the "Program" button next to the 8051 box, because then we are programming the 8051!). Now this program should work and display some colored crosses at the places where movement was detected.

Simulation on your PC with an example

Finally, we are going to simulate an example program. Go to the Command Prompt and change the directory to "C:\WiCa\XTCC". Here, if you type "go rgb lena640", a simulation of the program "rgb" (which just outputs the input image) is started with input image lena640.ppm. Of course, with the program IrFanView, every picture could be converted to .ppm format which could serve as an input image of this example. The outcome will be displayed on your screen. Play with it to see how things work.

ZigBee example

To wireless communicate through ZigBee, you need the Aquis Grain USB ZigBee module and the WiCa ZigBee module (which is already plugged in). First, plug in the USB ZigBee module into your computer. Remember at which COM-port this module is located. Then, make sure the first dipswitch element, seen from the sensor side, is set downwards in the direction of the CPLD GPIO to let the 8051 know that we want to communicate by means of the ZigBee module. See the picture.

Dipswitch setting for ZigBee/USB cable mode

Now, connect the USB cable from the WiCa board to your computer, which is now only needed for the powering up the WiCa board. If everything went well, after a few seconds of initializing, only the green LED on the ZigBee WiCa module will flash at a very low frequency rate. If the red LED is flashing rapidly, there is some communication error. The WiCa board will now be in demo mode and will display the input of camera one together with some moving blocks on the screen. Now, start up the WiCaEnv program and select the proper COM port at which the ZigBee module is located. Then, click at button "AG Open". Now, under "Device", there will be two names; "BROADCAST" and a number with an address. Select the latter and choose "Select". Now, the WiCa board must have given its main menu options, like in the picture.

Screenshot WiCaEnv (ZigBee)

If everything went well, you now may wirelessly program the movement detection IC3D file which we have discussed earlier in this chapter in the "Compilation and programming IC3D at the WiCa board with an example" section following the same procedure. Programming this file now may take a few seconds. Now, after the program is running on the Xetal chip, go to the map C:\WiCa\Displayer_1player_ball\Debug. In this Displayer_1player_ball map, a visual C++ program is located as an example application with the WiCa board. Start the Displayer.exe program to get a skeleton dummy on your screen. Now, go back to the WiCaEnv and deselect the "Screen" option. At the bottom text box, type the capital letter "C" followed by Enter to toggle the Special EBU Mode. Finally, select the "Socket" option and go back to the skeleton application. The skeleton now must follow your movements! Note: if you want to look and play around the message commands from the WiCa application to the PC, look at the bottom "save =" items in the movement_detection.xtc file. The "pid" variable denotes the byte count number of the message. Also, in the visual C++ file Displayer.cpp, look below the section where the words "Data from WiCaEnv is received here !!!!!" is commented out.

Other examples

In the map "C:\WiCa\XTCC\Examples", there are several other example programs available. For example, look in the folder "Stereo" for an example which makes use of both camera's (which may be used for stereo vision). A template for your program could be the lcd_h program inside the same named map. Also, notice the include files for your C program in the map "C:\WiCa\XTCC\Include", e.g. the "filt" map, which contains various filter subroutines.

[Go to the top]

4. The assignment

Now that you are familiar with the software programs and C language for programming the WiCa board, you are ready to start the assignment which consist of a couple of steps.

[Go to the top]

5. Contact

For questions, remarks or other issues related to the WiCa board or the WiCa assignment, you may contact:

[Go to the top]