Course M330
Programming Microsoft .Net Applications for Communicating via RS232, USB or Ethernet with Microchip Microcontroller Systems
Programming Microsoft .Net Applications for Communicating via RS232, USB or Ethernet with Microchip Microcontroller Systems
Duration: 5 Days
Intended Audience
The course is aimed at those who will be implementing applications running on Microsoft Windows systems for communicating and controlling PIC based embedded systems, where the communication medium is RS232, Ethernet or USB.
Attendees are expected to have some familiarity with object oriented concepts and with C programming, as well as some experience of working on embedded systems.
Course Overview
The course will provide an introduction to .Net, to C# programming and to the implementation of Graphical User Interfaces using Windows Forms. It will also cover techniques for implementing C# applications that can communicate with embedded targets over RS232, ethernet and USB. In addition the course will cover strategies and patterns for designing and implementing suitable messaging protocols over these communication links.
Key Skills
On completing the course delegates will
- Have a good basic understanding of C# programming and .Net
- Be able to use .Net serial communications classes in application development
- Know how to make use of Microsoft's .Net technology for writing USB applications as well as Microchip's USB driver code
- Know how to implement TCP/IP networking applications in C#
Course Contents
Overview of .Net
- .Net history and philosophy
- .Net Common Language Runtime (CLR)
- Relationship of .Net to the Win32 API
- Overview of the Windows Driver Foundation (WDF)
- .Net support for serial communications
- .Net support for network programming
Introduction to C# and object oriented programming
- Identifiers, types and variables
- Expressions, operators, statements
- Organising types - files, namespaces, modules and assemblies
- Inheritance
- Access modifiers
- Classes and structs
- Interfaces
- Arrays
- Enums
- Delegates
- Events
- try Statements and Exceptions
- Attributes
Programming the .NET Framework
- Strings and Collections
- Regular expressions
- Streams and Input/Output
- Networking
- Threading
- Interoperating with native DLLs
Introduction to Windows Driver Foundations
- Overview of the Windows Driver Architecture
- The WDF Object and I/O Model
- User space drivers and UMDF
- Overview of COM and C++
- Understanding Plug and Play
- UMDF Driver Template
- WDF, UMDF and user space USB driver development
- Accessing COM from .Net
User Space USB Driver Programming - Microsoft Windows
- Host to Device Communication
- Matching the Driver to the Device
- Detecting Devices
- HID Devices
- Microchip USB Framework
Messaging protocols for control and communication
- Modelling communications via communicating extended Finite State Machines
- Simple command response protocols
- HTTP based request-response protocols
- Overview of using XML for structuring messages
Grahpical User Interfaces
- Web browser based GUIs
- Windows Forms based GUIs
