A Review of FEZ Domino and FEZ mini from TinyCLR.com

Purchase FEZ Domino from SparkFun

http://fieldeffect.info/wp/wp-content/uploads/2014/08/4582055932_d8067e2667.jpg

A size comparison, left to right: FEZ Mini, FEZ Domino, Arduino

FEZ Domino is a simple controller board that is pin-compatible with Arduino. A controller board is a device that contains a microcontroller, which is a small chip at the heart of just about every “smart” device you can think of: your DVR, your TV, maybe even your refrigerator or microwave oven.

If you aren’t familiar with microcontrollers, you may want to start here, and here. For those who know a bit more, FEZ is a platform which allows you to program in physical hardware using C#. So, if you’re a programmer, and you’re interested in building your own MP3 player or USB device, but you’ve never worked with electronics before, FEZ might be a good place for you to start learning.


Introduction

The FEZ Domino board is a well-equipped piece of hardware, having an LPC2388 NXP 32-bit ARM processor running at 72 MHz, an USB On The Go interface, a Micro SD card interface, and pinout compatibility with Arduino. It also features the relatively new .NET Micro Framework from Microsoft. Although the idea of Microsoft getting into the embedded market initially irked me, I wondered if this was as easy as it claimed to be. The idea struck me to try using this board for the USB On The Go file server I have been planning.

Setup

I wanted to get started developing on the Domino board as quickly as possible. So the first thing I did when receiving the FEZ Domino, was to go to the Downloads section of the TinyCLR web site. Once there, I opened the “Beginner’s e-book”, and skipped to Section 5.1, “System Setup”. This PDF guide conveniently has the links to the Microsoft development tools. I was pleasantly surprised to see that Microsoft did not make me enter my Microsoft username and password to download C#.

Per the guide, there are 3 steps to getting all of the software tools you need:

  1. Download and install Visual C# Express The correct link for VS2008; see below.

  2. Download and install the .NET Micro Framework

  3. Download and install the GHI NETMF SDK

Step 1

I installed a fresh copy of Visual Studio C# onto a Lenovo IdeaPad S10-2 with Windows XP installed. I chose to do this because my other PC, an Apple MacBook Pro with Windows 7, already has Visual Studio running on it, and I wanted try this from scratch in case there were any conflicts.

As with the other IDEs from Microsoft, Visual C# Express takes a while to download and install. It took about 45 minutes to complete the entire install on a WiFi G connection.

Now, on to the second step… Hmmm. Here comes the Microsoft goodness:

http://fieldeffect.info/wp/wp-content/uploads/2014/08/4582258222_446eb6f211_o.jpg

Ok… but I just installed Visual C#… Actually, I kind of had a feeling this would happen, so I should have listened to my gut instinct before installing C#. See, the TinyCLR guide says “First download and install Visual C# express 2008 with SP1,” however the link points here, to Visual Studio 2010. Now I will either have to find a download for the 2008 edition, or purchase an expensive copy of Visual Studio 2008.

To me, this is a typical frustration I’ve dealt with in using Microsoft products– at least ones downloaded from their web site. I wait 45 minutes to install a framework or environment, only to find that what I just installed wasn’t the correct version. I went through similar headaches back when I did some development work for the Windows Mobile 5 platform in the VS2005 environment. I should mention that this is not a fault of TinyCLR, but of Microsoft.

So with a small amount of legwork on the MS web site, I was able to find the link to Visual Studio Express 2008 (you will need to click on the Visual Studio Express 2008 link). A quick look on the TinyCLR forum reveals the same link. So I first un-installed VSX2010, so that I didn’t cause any conflicts in running simultaneous copies of Express Studio.

Step 2

The Micro framework installed quickly and easily once I had VSX2008 installed.

Step 3

The GHI Micro framework installed quickly and easily once VSX2008 was installed.

Experience

Once I had all the tools installed, I spent some time trying to follow the Beginner’s Guide To NETMF (here). The guide was very clear, but I couldn’t get my code to run. It took me about an hour to figure out that I had to upgrade my firmware to match the version of the GHI NETMF framework I had just installed.

TinyCLR has a video to help you understand how to upgrade the firmware, which is great for people who have never upgraded the firmware on an embedded device before. However, I would have preferred it in writing. Here are the steps you need to upgrade the FEZ firmware:

Upgrading your Firmware

  1. Make sure TeraTerm is installed (link)

  2. Connect FEZ on the USB port.
  3. Enter “bootload” mode:
    1. Hold down the reset button on FEZ Domino, wait a second, and then press the LDR button.
    2. Release the reset button, with your finger still on the LDR button
    3. Release the LDR button.
  4. The first time you enter the bootload mode, you should be prompted to install the drivers.
    1. You will have to choose “Have Disk…”. By default, bootloader drivers are installed in “C:Program FilesGHI ElectronicsGHI NETMF v4.0 SDKUSB DriversGHI_Bootloader_Interface”
  5. Open TeraTerm, select “Serial”, and connect to the COM port with the highest number.

  6. Once connected, press capital “V” to see the current bootloader version.
    1. If it didn’t show anything, you may need to try entering the bootloader again.
  7. Press capital “X” to begin transferring the latest firmware.
  8. When you see the letter “C” begin to repeat across the TeraTerm window, this indicates that the FEZ is ready to receive the firmware file.

    1. In the TeraTerm menu, select File->Transfer->XMODEM->Send

    2. At the bottom of the file window you should see the “Option” section. Click the “1K” radio button.
    3. By default, the latest firmware is installed in “C:Program FilesGHI ElectronicsGHI NETMF v4.0 SDKUSBiziFirmware”. Browse to that directory.
    4. Select the “USBizi_CLR.GHI” file and click “OK”

You should see a progress bar and an indication that the file was transferred successfully. Once this is complete, the device should reset itself, or you can press the “reset” button on the FEZ.

To summarize, make sure you do the following when you set up:

  1. Download Visual C# Express 2008 (2010 does not work as of May, 2010)
  2. Install the Microsoft .NET Micro Framework
  3. Install the GHI Framework
  4. Upgrade your firmware

Once all this is complete, you should be able to be up and running with the code examples that are in the Getting Started guide.

First Impressions

I was skeptical about .NET Micro Framework platform at first, mostly because it was being promoted by Microsoft. I have two primary reasons for this: (1) I have personally known Microsoft to change their development platforms frequently, causing problems with forward compatibility of code. I’ve seen this especially with their Web technologies, with their Office products, and in the transition from VB6 to VB.NET they “broke” the syntax of the Visual Basic language by eliminating some features (such as the ‘Set’ command). I understand that progress is important, but I also know that supporting your customers should come first. (2) Microsoft has traditionally not “played well” with the Open Source community. If FEZ is a product that’s geared towards hobbyists and midnight engineers, Open Source is pretty critical. It’s important that low-cost development tools are available, and that licensing costs are not too hefty, in case one creates a device worth marketing.

That said, this is truly a powerful development environment. The Visual Studio environment is very mature, and debugging couldn’t be easier. You can run your code directly on the FEZ device, and set breakpoints in the code, and it will stop the hardware just as if it were running on your own computer. Once your design is complete, the FEZ has non-volatile memory, so you can simply unplug the it from your USB and let it run autonomously. The frustrations I had in setting up the device disappeared when I saw how easy it was to get relatively complex systems up and running almost trivially.

Once you use the Getting Started guide to get the LED code working, you will find that you can more or less copy and paste the other examples to get much more complex systems running. Within about 30 minutes of getting started, I had an LED blinking, then I was able to read an SD card, then I got a USB host running. Although the power of what you are doing may be lost on C# programmers, I think that most embedded developers will realize the massive effort involved in getting an SD card or a USB host running on an ordinary microcontroller.

This is a great device to bridge C, C++, or C# programmers into the world of physical computing. If you are interested in building a device, you’re a programmer, and you want a powerful development environment, this is your ticket. You will find that you can build very complex devices with very little time and effort relative to using a microcontroller.

Have fun!