Introduction to .NET Micro Framework Development

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites

    Introduction to .NET Micro Framework Development - Presentation Transcript

    1. Introduction to .NET Micro Framework Christopher Fairbairn ARANZ Medical Ltd [email_address]
    2. The Device Landscape Windows Mobile, Pocket PC, SmartPhone, Windows CE Windows XP, Windows Vista, Windows XP Embedded Remote Controls , Wearable Devices, Auxiliary Displays Increasing functionality .NET Micro Framework .NET Compact Framework .NET Framework
    3. Tahoe Development Board
      • 35mm x 35mm processor module
      • 4MB Flash, 8MB SDRAM
      • 100Mhz ARM920T Processor
      www.devicesolutions.net
    4. .NET Micro Framework
      • Smart Personal Object Technology (SPOT)
      • .NET Runtime in 300KB
      • Supports X86, ARM7, ARM9, M68K
    5. C# experience VS 2005 Standard Edition .NET Micro Framework SDK A real device .NET MF - Requirements
    6. Porting the .NET MF native User Applications and Libraries BCL .NET WPF Comms … CLR Execution Engine Type System Garbage Collector Interop PAL Timers RAM IO … Application Layer Class Library Layer Runtime Component Layer Hardware Layer Processor and Peripherals HAL OS or Drivers Facilities managed
    7. Compiling for the .NET MF
      • Supports CLS and CIL
      • C# only
      • No generics
      • Minimal assembly validation
      • Secure bootloader
      C# Source .NET Assembly .NET Micro Framework Assembly Device C# Compiler Metadata Processor Deployment
    8. Hello World
      • 1974 Bell Laboratories memo by Brian Kernighan
      main() { printf(“hello, world”); }
    9. Hello World OutputPort led = new OutputPort(Meridian.Pins.GPIO5, true); while (true) { Thread.Sleep(5000); led.Write(!led.Read()); }
    10. DEMO The development process
    11. Group Project
      • Kitchen Timer
      • Push buttons
      • Tilt to pause
      • Logging
    12. GPIO and Interrupts pin = new InterruptPort(Tahoe.Pins.SW9, true, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdge); pin.OnInterrupt += Pin_OnInterrupt; pin = new InputPort(Tahoe.Pins.SW9, Port.ResistorMode.PullUp); bool state = pin.Read(); pin = new OutputPort(Tahoe.Pins.SW9, true, Port.ResistorMode.PullDown); pin.Write(true); InputPort OutputPort InterruptPort
    13. .NET MF GUI Support
      • Improves with each release
      • Inspired by WPF
    14. Drawing Primitives Bitmap bmp = new Bitmap(SystemMetrics.ScreenWidth, SystemMetrics.ScreenHeight); bmp.DrawRectangle( red, // outline colour 10, // outline thickness 20, 30, // x, y 40, 50, // width, height 0, // xCornerRadius 0, // yCornerRadius 0, 0, 0, 0, 0, 0, 0); bmp.Flush(); // copy bitmap to LCD
    15. Drawing Primitives
      • Object Orientated
      • Scene description
      • No declarative markup (XAML)
      Rectangle rect = new Rectangle(); rect.Width = 40; rect.Height = 50; rect.Fill = new SolidColorBrush(Color.Black); rect.Stroke = new Pen(Color.White, 10);
    16. Creating Windows
      • Static Controls
        • Text, Bitmap
      • Content Controls
        • Border, ListBoxItem
      • Container Controls
        • Canvas, StackPanel, ScrollViewer
      • Bitmap Fonts
    17. DEMO Creating the basic Kitchen Timer Application
    18. Interfacing Custom Hardware
      • Direct hardware access considered “unsafe”
      • Managed interfaces
        • GPIO
        • Serial
        • I2C
        • SPI
      • More options for porting partners
        • PWM
    19. Tahoe Accelerometer Module
      • Analogue Accelerometer chip
      • I 2 C based ADC
      • Managed Device Driver
    20. Input Manager
      • Coordination of all input devices for WPF
      • Turns raw input into WPF events
      • Helper methods
        • Buttons.IsButtonUp(Button.Pause);
    21. DEMO Adding tilt support
    22. Weak References
      • A way to alter GC behavior
      • Useful for implementing caches
    23. Weak References
      • A way to alter GC behavior
      • Useful for implementing caches
      WeakReference wr = new WeakReference(new SomeClass()); SomeClass foo = wr.Target as SomeClass; if (foo == null) foo = new SomeClass();
    24. Extended Weak References
      • Persists objects to EEPROM
      • Can recover objects after device restarts
        • SurviveBoot
        • SurvivePowerDown
      • Storage Priorities
    25. DEMO Creating a log of Kitchen Timer usage
      • bansky.net/blog
      • www.microframework.cz
      • .NET Micro Framework Team Blog
      • microsoft.public.dotnet.framework.microframework
      Getting Started
    26. Contact Information Christopher Fairbairn ARANZ Medical Ltd Questions? Email: [email_address] Website: www.christec.co.nz/blog/

    + christopherfairbairnchristopherfairbairn, 2 years ago

    custom

    2232 views, 2 favs, 2 embeds more stats

    An introduction to the .NET Micro Framework and the more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 2232
      • 2067 on SlideShare
      • 165 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 7
    Most viewed embeds
    • 152 views on http://www.christec.co.nz
    • 13 views on http://christec.co.nz

    more

    All embeds
    • 152 views on http://www.christec.co.nz
    • 13 views on http://christec.co.nz

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories