Beginners Guide to C# and the .NET Micro Framework by Gus Issa - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

2. Introduction

Have you ever thought of some great idea for a product but you couldn't bring it to life because technology wasn't on your side? Or maybe thought, “there's got to be an easier way!” Maybe you are a programmer that wanted to make a security system but then thought using a PC is too expensive to run a simple system? The answer is Microsoft's .NET Micro Framework!

Here is a scenario, you want to make a pocket-GPS-data-logger that saves positions, acceleration, and temperatures on a memory card and displays them on a small display. GPS devices can send position data over a serial port, so you can easily write some code on a PC to read the GPS data and save it on a file. But a PC won't fit in your pocket! Another problem is how would you measure temperature and acceleration on a PC? If you make this project using classic microcontrollers, like AVR, or PIC micro, all this can be done but then you need a compiler for the microcontroller you chose (which probably very expensive), a week to learn the processor, a week to write a serial driver, a month or more to figure out the FAT file system and more time for memory cards...etc. Basically, it can be done in few weeks or months of work.

2.1. Advantages

If you are using .NET Micro Framework then there are many advantages:

1. It runs on Microsoft's Visual C# Express, free and and high-end IDE.

2. .NET Micro Framework is open-source and free.

3. Your same code will run any NETMF device with almost no changes.

4. Full debugging capabilities. (Breakpoints, stepping in code, variables...etc.)

5. Has been tested in many commercial products, with assured quality.

6. Includes many bus drivers.(SPI, UART , I2C...etc.)

7. Eliminates the need to use complicated and long processors' datasheets.

8. If you are already a PC C# programmer then you are know NETMF.

Throughout this document, I will refer to .NET Micro Framework as NETMF.