Seems like end of the year brought new interesting .NET Micro Framework capable hardware. GHI Electronics introduced their FEZ initiative, which truly opens .NET Micro Framework space to everybody and I think we will hear much more about it in the future. But today I want to blog about new hardware from Sytech Designs, U.K based company. You might know Sytech Designs as a distributor of Device Solutions hardware as well as embedded solutions vendor.

MicroDev 400x262 Meridian Heart

Meridian as we want it

Sytech Designs came up with the small factor development board based on Meridian CPU. I personally value the decision to use well known CPU with good community and manufacturer support. Especially because installation of the new SDK would be boring and Meridian was missing his Single Board Computer reincarnation a lot. Although, we have Meridian/P, which is the first Meridian for hobbyist, it lacks some peripherals out-of-the-box (Ethernet, D-Sub 9, SD/MMC). The new MicroDev is declared as a development kit but it can bee used as a single board computer, which is where I see the big potential.

It comes with the D-Sub 9 serial connector, Ethernet, SD/MMC card slot and GPIO extension header. Debugging is done via USB, as we are used to do with Meridian. Beside the standard GPIO extension header (two GPIOs designated for LED and button), there is a LCD extension connector.

For all those hobby or low-series applications where Tahoe-II was too clumsy and Meridian/P too raw, the MicroDev is the perfect choice.

MicroDev 400x262 Peripherals

Features

  • Freescale i.MXS ARM920T at 100MHz
  • 8MBytes SDRAM
  • 4MBytes Flash
  • USB application download and debug
  • 2 Serial Ports: 1 logic level + 1 RS232 level
  • SPI
  • I2C
  • PWM
  • Frequency Counter
  • Ethernet via RJ45 connector
  • SD Card
  • JTAG connector
  • TFT LCD Touchscreen expansion connector
  • Button and LED accessible from application code
  • 27 GPIO pins - all can be configured as interrupts
  • Power via External +5v or via USB
  • 3V3 Power Supply o/p available
  • All Meridian signals available via 0.1” headers
  • Dimensions: 100x65 mm
  • 6x Mounting holes
  • More at http://www.sytechdesigns.com/

When upgrading different beta versions of .NET MF 4.0 or doing final upgrade to RTM, one can experience problems in Vsual Studio during compilation. Typically this compilation error is shown:

Error 1 The "Microsoft.SPOT.Tasks.GetDeviceFrameworkPaths" task could not be loaded from 
the assembly Microsoft.SPOT.Tasks,Version=4.0..,Culture=neutral,PublicKeyToken=2670f5f21e7f4192. 
Could not load file or assembly 'Microsoft.SPOT.Tasks, Version=4.0, Culture=neutral, 
PublicKeyToken=2670f5f21e7f4192' or one of its dependencies. The system cannot find the file 
specified. Confirm that the  declaration is correct, and that the assembly and all 
its dependencies are available.	
C:\Program Files (x86)\MSBuild\Microsoft\.NET Micro Framework\v4.0\Device.targets	101	9

Investigation

Error message points to C:\Program Files (x86)\MSBuild\Microsoft.NET Micro Framework\v4.0\Device.targets where everything seems to be fine. But Device.targets imoprts Tasks.settings from the same directory, which is very important. This files basicaly defines the name of TaskAssembly, which consists of two registry keys. And this is the problematic place. The necessary registry keys are sometimes not created or updated by the installation process (don’t know why).

<PropertyGroup>
    <CurBuildNumber>$(Registry:HKEY_LOCAL_MACHINE\Software\Microsoft\.NETMicroFramework\v4.0@BuildNumber)</CurBuildNumber>
    <CurRevNumber>$(Registry:HKEY_LOCAL_MACHINE\Software\Microsoft\.NETMicroFramework\v4.0@RevisionNumber)</CurRevNumber>

    <TasksAssembly>Microsoft.SPOT.Tasks,Version=4.0.$(CurBuildNumber).$(CurRevNumber),Culture=neutral,PublicKeyToken=2670f5f21e7f4192</TasksAssembly>
</PropertyGroup>

Read more...


Some Windows Mobile devices today are equip with USB mass storage drive functionality. It means, that device is not connected to computer via activesync but behaves as a USB flash disk. However, some customers don’t like this feature and wants to disable this functionality for their users. Disabling just ActiveSync won’t help in this case.

To solve this issue I’ve done a little research and put together the following ADM script for Windows Mobile mobile management templates into System Center Mobile Device Manager 2008. It’s very simple to use, just add this template to your Active Directory templates and start using USB Mass Storage policy under the Security Policies.

CLASS MACHINE
CATEGORY "Windows Mobile Settings"
      CATEGORY "Security Policies"
           POLICY "USB Mass Storage"           
           KEYNAME "SOFTWARE\Policies\Microsoft\Windows Mobile Settings\Registry\HKLM\Drivers\USB\FunctionDrivers"
           
              ACTIONLISTON 
                  KEYNAME "SOFTWARE\Policies\Microsoft\Windows Mobile Settings\Registry\HKLM\Drivers\USB\FunctionDrivers\Mass_Storage_Class" 
                      VALUENAME "Dll" 
                      VALUE "USBMSFN.dll"
                  KEYNAME "SOFTWARE\Policies\Microsoft\Windows Mobile Settings\Registry\HKLM\Drivers\USB\FunctionDrivers" 
                      VALUENAME "DefaultClientDriver" 
                      VALUE "RNDIS" 
              END ACTIONLISTON 
              ACTIONLISTOFF 
                  KEYNAME "SOFTWARE\Policies\Microsoft\Windows Mobile Settings\Registry\HKLM\Drivers\USB\FunctionDrivers\Mass_Storage_Class" 
                      VALUENAME "Dll" 
                      VALUE "none"
                  KEYNAME "SOFTWARE\Policies\Microsoft\Windows Mobile Settings\Registry\HKLM\Drivers\USB\FunctionDrivers" 
                      VALUENAME "DefaultClientDriver" 
                      VALUE "RNDIS" 
              END ACTIONLISTOFF            
            END POLICY
      END CATEGORY 
END CATEGORY

It’s a been quite while, when I published the the first article about C328R Jpeg camera. It turns out to be the most discussed article on my blog. With new features, that came with .NET Micro Framework 3.0, I’ve decided to make a little update to C328R class.

C328R camera module 340x290 C328R camera module

What’s new

One thing that changed in version 3.0 of Micro Framework was the serial port API. Since C328R camera module is operated via serial port, the update was necessary. Anyway, this brings one big advantage of one compatible class for .NET Micro Framework and full .NET Framework. In next days I will try to connect the camera to desktop computer and to talk to it from C#. Long story short, the constructor and initialization of the C328R class might look like this.

// Create camera  
C328R camera = new C328R(new SerialPort("COM2", 115200));  

// Synchronize with camera 
camera.Sync();   

// Set baud rate - optional  
camera.SetBaudRate(C328R.BaudRate.Baud115200); 
// Set light frequency - optional 
camera.LigtFrequency(C328R.FrequencyType.F50Hz); 

// Initiate camera and picture details
camera.Initial(C328R.ColorType.Jpeg, 
                C328R.PreviewResolution.R160x120, 
                C328R.JpegResolution.R640x480);

Read more...


There was a question last week in the discussion group about animated bitmaps. The main problem was with chaining single bitmaps from resources into one animation. In one of my old projects I was using simple image strip, where frames were stored in the single image. I think, this might be useful also in the .NET Micro Framework.

Heating spiral 560x100 Animation strip

The AnimatedIcon class is very simple and it’s constructor takes three arguments. First is the bitmap strip, second is the width of one frame and third argument is animation interval. Jan Kučera also came with solution for animated icons for .NET Micro Framework. His class enables starting and stopping of animation.

I believe that usage of AnimatedIcon is pretty straight-forward. The only issue I see is the speed of animation for large images.

mainWindow = new Window();
mainWindow.Height = SystemMetrics.ScreenHeight;
mainWindow.Width = SystemMetrics.ScreenWidth;

AnimatedIcon image = new AnimatedIcon(Resources.GetBitmap(Resources.BitmapResources.spirala),
                                      70,   // Width of one frame
                                      200); // Animation interval
mainWindow.Child = image;
public class AnimatedIcon : UIElement
{
    /// <summary>
    /// Creates new instance of AnimatedIcon
    /// </summary>
    /// <param name="bitmap">Source bitmap strip</param>
    /// <param name="width">Width of one frame</param>
    /// <param name="interval">Animation interval in miliseconds</param>
    public AnimatedIcon(Bitmap bitmap, int width, int interval)
    {
        _bitmap = bitmap;
        _width = width;            
        _totalCount = (bitmap.Width / _width);
        _timer = new DispatcherTimer(this.Dispatcher);
        _timer.Interval = new TimeSpan(0, 0, 0, 0, interval);
        _timer.IsEnabled = true;
        _timer.Start();
        _timer.Tick += new EventHandler(_timer_Tick);
    }

    void _timer_Tick(object sender, EventArgs e)
    {
        if (_index < _totalCount - 1)
            _index++;
        else
            _index = 0;

        this.Invalidate();
    }

    public override void OnRender(Microsoft.SPOT.Presentation.Media.DrawingContext dc)
    {
         dc.DrawImage(_bitmap,0, 0, _index * _width, 0, _width, _bitmap.Height);
         base.OnRender(dc);
    }

    private DispatcherTimer _timer;
    private Bitmap _bitmap;        
    private int _width, _index, _totalCount;
}

In my last engagement I was facing the problem of updating SCMDM certificate. The preferred way was to do it from the Windows Mobile device. I was blogging about similar topic some time ago, so this will be the extension of the original article.

Find what you want to update

If you do simple query into the MY certificate store on your enrolled device.

<wap-provisioningdoc>
    <characteristic type="CertificateStore"> 
       <characteristic-query type="MY" />
    </characteristic>  
</wap-provisioningdoc>

Read more...


I’ve seen many intelligent apartment concepts and technologies, including Microsoft super apartment located here in Prague. In fact all these concepts are nothing but pile of silicon crap collected in one apartment with 15 different remote controllers laying around. I believe that final solution has to be one remote controller for all devices. I also believe that all devices should be powered by .NET Micro Framework. This means there must be a way how to connect Infra Red receiver with .NET Micro Framework.

Read more...


What I like most about .NET Micro Framework is the interfacing :) Today it will be blog post about interfacing and controlling of bi-polar stepper motor. I was about to do it some time ago, and when question on stepper was raised in the discussion group I’ve decided to pick the gauntlet. As you will see driving stepper motor is truly piece of cake.

Read more...


This year was a first one where broader Micro Framework community meet. Meet point was Embedded World in Nurnmebrg. It was good event and location, not so far for most Europeans and New Zealenders :-) No matter how internet is cool, meeting people face to face is always better.

Here comes few pictures from our MicroCon. More pictures at Michael’s Blog.

Looking forward to see more people there next year!

Micro Framework Community 640x480

Read more...


Updated and improved documentation for .NET Micro Framework 3.0 was released in February. Now you can have full reference for Micro Framework classes always available on your hard drive.

I believe this will finally solve problems with finding right reference for some classes. Don’t wait and start downloading from MSDN: .NET Micro Framework SDK 3.0 February 2009 Documentation Update.

Update is a simple zip file with documentation and readme.txt describing the installation process. It’s nothing more than copying PSDK.hxs from zip archive into the C:\Program Files\Microsoft .NET Micro Framework\v3.0\Documentation\NET MicroFramework Docs

Enjoy!

Micro Framework Documentation 510x348 Documentation