Embedded Master User Manual Rev. 2.06 TFT Date: December 17, 2009User Manual Embedded Master Module (Non-TFT) Embedded Master Module Document Information Information Description Abstract This document covers complete information about Embedded Master Module and Development System, specifications, tutorials, and references.
GHI Electronics,LLC Embedded Master User Manual Revision History Date Modification 12/17/09 Added WiFi support Added MFW-WiFi expansion USB VBUS description 08/17/09 Storage Devices documentation changed USB Client documentation changed 06/05/09 USB host update various updates and additions 04/29/09 Fix TFT power pins description Updated Getting Started section various updates and additions 03/23/09 Few fixes Updated USB Device (Client) section Updated USB Host section Add PPP feature section
GHI Electronics,LLC Embedded Master User Manual Table of Contents Table of Contents 1.Introduction.....................................................................................4 8.1.Updating Firmware (TinyCLR) using MFDeploy.................51 1.1.What is The Microsoft .NET Micro Framework.....................4 8.2.Updating TinyBooter............................................................52 1.2.What is Embedded Master Module.......................................59.GHI Loader..................
GHI Electronics,LLC Embedded Master User Manual Introduction 1. Introduction 1.1. What is The Microsoft .NET Micro Framework The Microsoft .NET Micro Framework combines the reliability and efficiency of managed code with the premier development tools of Microsoft Visual Studio to deliver exceptional productivity for developing embedded applications on small devices. The .NET Micro Framework brings a rich, managed-code environment to smaller, less expensive, and more resource-constrained devices.
GHI Electronics,LLC Embedded Master User Manual Introduction 1.2. What is Embedded Master Module Embedded Master Module is a very small RoHS hardware module (1.55”x1.55” for nonTFT version and 1.55”x1.8” for TFT version) that hosts the Microsoft .NET Micro framework. Developers can now use .NET Micro Framework 3.0 and write managed code (C#) without having to deal with much complexity of hardware and software. Embedded Master Module is fully licensed to use .NET Micro Framework. In addition to .
GHI Electronics,LLC Embedded Master User Manual Introduction 1.3. What is CANxtra CANxtra™ is highly customizable product for today's sophisticated market needs. The core of CANxtra is the popular Embedded Master module. Therefore, it has all of features Embedded Master offers including the extra features and USB hosting. This an in-box development system, it exposes all Embedded Master peripherals. All needed signals are available on the 25-pin connector.
GHI Electronics,LLC Embedded Master User Manual Introduction 1.4. What is USBizi USBizi chip -pronounced USB easy- is a headless .NET Micro Framework system based on LPC2388\LPC2387 chipsets. It is basically a subset of Embedded Master which provides many of the great features Embedded Master offers, with everything implemented on a single chip. This is the smallest and lowest cost Micro Framework device that still implements unique features like USB host.
GHI Electronics,LLC Embedded Master User Manual Introduction 1.4.1 USBizi Development System This is a (2.2x2.2 inches) development system based on USBizi chipset that exposes all the peripherals. This Development System is very easy to use and can be powered through USB. This board can be used as an OEM board that could be suitable for many product Ideas.
GHI Electronics,LLC Embedded Master User Manual Introduction 1.6. Embedded Master Key Features 1.6.1 Software Feature Supported Microsoft .NET Micro Framework V3.
GHI Electronics,LLC Embedded Master User Manual Introduction Feature Supported USB Host √ USB Host Hub √ USB Host Mass Storage √ USB Host HID (Mouse, Keyboard, Joystick) √ USB Host Printer √ USB Host CDC √ USB Host to Serial FTDI √ USB Host to Serial Prolific √ USB Host to Serial SiLabs √ USB Host to Serial Sierra C885, 3G Modem √ USB Host Low Level Access √ USB Device (Client) √ USB Client Mouse Direct Support √ USB Client CDC (VCOM) Direct Support √ USB Client Mass Storage
GHI Electronics,LLC Embedded Master User Manual Introduction ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 10/100 Ethernet Interface Embedded USB host/device Graphics on SPI LCDs 51 GPIO Pins + 20 on LCD Connector (45 on Non-TFT) 31 Interrupt Inputs + 10 on LCD connector (30 on Non-TFT) 2 SPI (8/16bit) I2C 4 UART 2 CAN Channels 7 10-bit Analog Inputs (4 on Non-TFT) 10-bit Analog Output 4-bit SD Memory card interface 5 PWM with two separate clocks (2 on Non-TFT) 160 mA current consumption with everything enabled
GHI Electronics,LLC Embedded Master User Manual Embedded Master Products 2. Embedded Master Products 2.1. Embedded Master TFT Development System GHI Electronics offers a development system for Embedded Master Modules. The development system exposes all peripherals and includes 480x272 4.3" display with touch screen . We highly recommend starting up with the development system. With this option, you will have a running system out-of-the-box.
GHI Electronics,LLC Embedded Master User Manual Embedded Master Products Reset Button SV1 Header LCD Header LCD connector USB Host RTC Battery TFT Connector SV4 Header Embedded Master TFT Module Analog Touch screen pins PWM/MISC LED to PWM0 Piezo The schematics are the best reference for the development system. The next few sections will explain the different parts of the development system. Take a look at the schematics for further details. 2.1.
GHI Electronics,LLC Embedded Master User Manual Embedded Master Products 2.1.4 USB Device This connector is connected to the internal USB device peripheral of Embedded Master Module. USB device feature allows Embedded Master to become almost any USB peripheral that can be connected to a PC. .NET Micro Framework 3.0 has the ability to change what type of USB device you need to create. 2.1.5 USB Host Embedded Master Module's USB Host connector.
GHI Electronics,LLC Embedded Master User Manual Embedded Master Products 2.1.7 CAN The development system wires one of the available CAN channels (channel 1) to a high speed transceiver. The outputs CAN_High and CAN_Low are connected to pins 7 and 2 respectively on connector X5. Pins 3 and 6 are connected to ground. High speed CAN transceivers require termination on the very last endings of the twisted pair wires. 120 ohm resistor should be on every end.
GHI Electronics,LLC Embedded Master User Manual Embedded Master Products signals to SV3 header. This can be used to connect to almost any LCD of your choice! (GHI support is required). You should not connect more than one display to the system. 2.1.10 SV1 header This header has the 3 most common serial interfaces (SPI1, I2C and UART) exposed. It also includes 3.3V and ground pins. This header can be used to connect to other circuits.
GHI Electronics,LLC Embedded Master User Manual Embedded Master Products Analog Header Header Pin # Function 1 E8/P0.23/ADC0 2 E7/P0.26/ADC3/AOUT 3 E6/P0.25/ADC2 4 E5/P0.24/ADC1 2.1.12 PWM/MISC PWM and other miscellaneous pins are available on this header. An LED is connected to PWM0 for a quick test of the PWM functionality. PWM/MISC Header Header Pin # Function 1 E13/P3.16/PWM0 (PWM Timer 0) 2 E14/P3.24/PWM1 (PWM Timer 1) 3 E16/P1.19/USB_PWR_EN 4 E19/P1.27/USB_OC# 5 GND 2.1.
GHI Electronics,LLC Embedded Master User Manual Embedded Master Products 2.2. CANxtra In-Box Development System CANxtra exposes all the peripherals available on Embedded Master, many are available on the DB25 connector. This is also a complete end product. 2.3. TFT Expansion and Touch Screen This product includes 480x272 4.3" TFT Display from Sharp and the circuitry needed for the display back-light.
GHI Electronics,LLC Embedded Master User Manual Embedded Master Products This board can not be used with older non-TFT modules (smaller modules). Rev. 2.06 TFT Page 19 of 102 www.ghielectronics.
GHI Electronics,LLC Embedded Master User Manual Embedded Master Products 2.4. Embedded Master VGA Expansion This expansion board is a very simple way to use a standard VGA monitor with Embedded Master TFT Development System. Users will need to remove the TFT Expansion included with the development system and replace it with the VGA expansion. This board can not be used with older non-TFT systems (systems with smaller modules). A simple resistor network is used to simulate a DAC.
GHI Electronics,LLC Embedded Master User Manual Embedded Master Products 2.6. Micro Framework WiFi Expansion MFW-WiFi is an expansion board designed by GHI Electronics that hosts ZeroG ZG2100 module which is SPI-based WiFi module. This module adds Wireless LAN feature to ChipworkX and Embedded Master by easily attaching MFW-WiFi expansion board to the development system. ZG2100 and ZG2101 modules are low-cost and FCC certified which makes them ideal for Microsoft .NET Micro Framework solutions.
GHI Electronics,LLC Embedded Master User Manual Embedded Master Products I/O used: 1. E26: Reserved for MFW-WiFi external Interrupt. User should not use it. 2. E28: Reserved for MFW-WiFi SPI SSEL signal. User should not use it. 3. SPI1: Embedded Master accesses MFW-Wifi through this SPI interface. User can only use the relative IOs (SCK, MOSI and MISO) for SPI interface.
GHI Electronics,LLC Embedded Master User Manual Embedded Master Products SSID Field: 47 48 49 2d 41 50 00 Rev. 2.06 TFT Page 23 of 102 www.ghielectronics.
GHI Electronics,LLC Embedded Master User Manual Embedded Master Architecture 3. Embedded Master Architecture The small (1.55"x1.8" TFT/1.55”x1.55” Non-TFT) module compacts everything needed to run a complete .NET Micro Framework. The Module is designed with low-cost and flexibility in mind. Applications ranging from simple data logger to high end security systems and industrial control can be based on Embedded Master Module.
GHI Electronics,LLC Embedded Master User Manual Embedded Master Architecture 3.2. LPC2468/78 Microcontroller The LPC2468/78 72Mhz ARM7 32-bit processor is the core of Embedded Master Module. The LPC2468 contains a memory acceleration interface with 128-bit internal FLASH memory. This lets the processor core run with zero wait states. Comparing to executing code from 16-bit external FLASH we see over 10 times the execution speed. The internal FLASH is 0.5MB that is used to run the complete .
GHI Electronics,LLC Embedded Master User Manual Embedded Master design Consideration 4. Embedded Master Design Consideration 4.1. Hardware The following peripherals are recommended to be exposed from the module in any design, possibly hidden from the end user: • UART0 (COM1) pins. (Updating TinyBooter/Firmware) • UP, Down and Select Buttons pins. (Selecting the BootLoader) • USB Device (Client) if it is used for debugging or TinyBooter communications 4.2.
GHI Electronics,LLC Embedded Master User Manual Embedded Master design Consideration EM Module Pin-outs EM Module Pin-outs 4.3.1 Machine Placement When electrical components are machine placed, they go under very high temperature very quickly and for a short time. This is needed to reflow the components. Device that are not sealed from humidity should be baked before they are to be used in machine placement. This is a standard procedure and Embedded Master needs to go in this process as well.
GHI Electronics,LLC Embedded Master User Manual Pin-Out Description 5. Pin-Out Description Most signals on Embedded Master Module are multiplexed to offer more than one function for every pin. It is up to the developer to select which one of the functions to use. GHI drivers and .NET Micro Framework does some checking to make sure the user is not trying to use two functions on the same pin. The developer should still understand what functions are multiplexed so there is no conflict.
GHI Electronics,LLC Embedded Master User Manual Pin-Out Description Embedded Master Module Pin-Out Description NonTFT TFT Rev Rev Pad # Pad # 8 9 10 8 9 10 11 11 12 12 13 13 14 15 E5 (P0.24)* Digital I/O # 5 (P0.24 on LPC2468) ADC1 Analog input channel 1 E6 (P0.25)* Digital I/O # 6 (P0.25 on LPC2468) ADC2 Analog input channel 2 UART_TXD3 UART 3 (COM4) data transmit output E7 (P0.26)* Digital I/O # 7 (P0.
GHI Electronics,LLC Embedded Master User Manual Pin-Out Description Embedded Master Module Pin-Out Description NonTFT TFT Rev Rev Pad # Pad # 20 20 21 21 Name Description E17 (P1.22) Digital I/O # 17 (P1.22 on LPC2468) E17 (P2.21)*TFT rev. Digital I/O # 17 (P2.21* on LPC2468) TFT rev. USB_PWR_RD USB power read. Connect to 5V of USB host power E18 (P0.11)* Digital I/O # 18 (P0.11 on LPC2468) BTN_MEN Default pin for Menu button E19 (P1.27) Digital I/O # 19 (P1.27 on LPC2468) E19 (P2.
GHI Electronics,LLC Embedded Master User Manual Pin-Out Description Embedded Master Module Pin-Out Description NonTFT TFT Rev Rev Pad # Pad # Name Description TFT_PWR Optional, connected to LCD header pins 3&4 TFT_CORE . (used to power TFT expansion with 3.3volts) ET48 (P3.27) Digital I/O # 48 (P3.27 on LPC2478) PWM4 PWM4 ( PWM Timer 1 ) N/A 34 N/A 35 N/A 36 GND Power Ground N/A 37 3.
GHI Electronics,LLC Embedded Master User Manual Pin-Out Description Embedded Master Module Pin-Out Description NonTFT TFT Rev Rev Pad # Pad # 41 51 Name E28 (P2.9)* Digital I/O # 28 (P2.9 on LPC2468) or E28 (P4.23) TFT rev. Digital I/O # 28 (P4.23 on LPC2478) UART_RXD2 42 43 44 52 53 54 45 55 46 56 47 48 57 58 49 59 50 60 51 61 52 62 Rev. 2.06 TFT Description UART 2 (COM3) receive data input E29 (P2.8)* or Digital I/O # 29(P2.8 on LPC2468) or E29 (P4.22) TFT rev.
GHI Electronics,LLC Embedded Master User Manual Pin-Out Description Embedded Master Module Pin-Out Description NonTFT TFT Rev Rev Pad # Pad # 53 63 54 64 55 65 56 66 57 67 58 68 59 69 Name Description E40 (P1.11) Digital I/O # 40 (P1.11 on LPC2468) SD_DAT2 SD Memory Data 2 E41 (P1.7) Digital I/O # 41 (P1.7 on LPC2468) SD_DAT1 SD memory Data 1 E42 (P1.2) Digital I/O # 42 (P1.2 on LPC2468) SD_CLK SD memory Clock E43 (P1.6) Digital I/O # 43 (P1.
GHI Electronics,LLC Embedded Master User Manual Pin-Out Description PIN# Name Description GPIO Number 20 G5 Green signal bit 5 ET56(P1.25) 24 B0 Blue signal bit 0 ET70*(P2.13) 25 B1 Blue signal bit 1 ET57(P1.26) 26 B2 Blue signal bit 2 ET58(P1.27) 27 B3 Blue signal bit 3 ET59(P1.28) 28 B4 Blue signal bit 4 ET60(P1.29) 30 LCD_CLK Clock ET61*(P2.2) 31 LCD_EN Enable ET63*(P2.4) 32 HSYNC Horizontal sync ET64*(P2.5) 33 VSYNC Vertical sync ET62*(P2.
GHI Electronics,LLC Embedded Master User Manual Pin-Out Description 5.1. Buttons on Embedded Master Development System Any of the interrupt capable inputs can be used as a button input. On the development system and code examples, these pins were selected.
GHI Electronics,LLC Embedded Master User Manual Getting Started with Embedded Master 6. Getting Started With Embedded Master 6.1. How Simple? Thanks to the .NET Micro Framework, programmers can now develop code for embedded systems without knowing anything about hardware internals. Some peripherals, like I2C, requires some knowledge on how it operates, as far as high level. The low level work is already handled by drivers that maps the physical hardware to Micro Framework Objects and Methods.
GHI Electronics,LLC Embedded Master User Manual Getting Started with Embedded Master 6.2. All you need to start up ● We recommend Embedded Master Development System for getting started. ● Any regular 9 – 15 Volt DC adapter with the inner connector positive . ● Microsoft Visual Studio 2008 SP1 or Microsoft Visual C# Express Edition SP1 installed with latest updates. ● Microsoft .NET Micro Framework SDK Version 3.0.
GHI Electronics,LLC Embedded Master User Manual Getting Started with Embedded Master 6.3. Powering up Embedded Master TFT Development System includes the main board with Embedded Master module placed on it with 4.3” TFT Expansion. It also includes a USB cable. User can power the board up by anywhere from 9V to 15V DC adapter 9 -15 volt DC Power Inner pin is positive or it can be power through USB Connector connected to Virtual COM - in the lower right corner (X1) -.
GHI Electronics,LLC Embedded Master User Manual Getting Started with Embedded Master Once the USB cable is plugged in, windows will ask for drivers. The drivers are in the Embedded Master SDK. For example, on this PC they are in %Embedded Master SDK Folder%\USB Debugging Drivers\GHIMFInterface.inf A snap shot from Device Manager after installing the driver Important Note: The Development System can not be powered through this USB connector. 6.5.
GHI Electronics,LLC Embedded Master User Manual Getting Started with Embedded Master We recommend that you run the driver installer above before plugging in the device. X3 USB Debugging Interface X1 Virtual COM USB Connector Interfacing UART0 port 6.6. Development System First Power-up The development system comes loaded with the latest firmware and pre-loaded with an example application. Power up the device using a power pack or a USB cable and you will see the example running on the LCD.
GHI Electronics,LLC Embedded Master User Manual Getting Started with Embedded Master 4. install USB debugging interface driver included with GHI SDK. 5. Run MFdeploy tool, choose USB from device list then you 'll see EmbeddedMaster_EmbeddedMaster in list. note: if you did not see that string you might have different default debugging interface or you did not install the driver correctly. 6. Pressing “ping” button on MFDeploy should return “TinyCLR”. This verifies that the board is responsive.
GHI Electronics,LLC Embedded Master User Manual Getting Started with Embedded Master 9. Place a breakpoint at Debug.Print line. You can do this by clicking on the line and then pressing F9. 10. Compile the application. There should be no errors. 11. Go to the menu and select “Project --> MyConsoleApp Properties...” and in the new window select the “Micro Framework” tab. In the tab, there are options for deployment. Select USB for transport and select EmbeddedMaster_EmbeddedMaster. Rev. 2.
GHI Electronics,LLC Embedded Master User Manual Getting Started with Embedded Master 12. Press F5 (Debug). You will see how Visual Studio loads the application and runs it. Visual Studio should pause at the breakpoint we placed in step 4. 13. make sure you have the output window open. If not, you can get it from the menu at “View --> Output” 14. Press F10 to step over Debug.Print and watch the output window. The output window should display “Hello World!” 15.
GHI Electronics,LLC Embedded Master User Manual Getting Started with Embedded Master Note: Use Visual Studio 2008 or Visual C# 2008 Express Edition with .NET Micro Framework V3.0 SDK firmware. 6.7. MFDeploy Tool MFDeploy is a free tool from Microsoft that is used to deploy firmware updates to the device. It can be used to load managed applications as well. This tool is included with Microsoft .NET Micro Framework SDK 3.0 Tools %Microsoft .NET Micro Framework\v3.0 folder%\Tools\MFDeploy.
GHI Electronics,LLC Embedded Master User Manual Getting Started with Embedded Master Net Micro Framework 3.0 release. This interface is always fixed for Tinybooter. Press “ping” button on MFDeploy If the firmware is running and you ping using MFDeploy, you will get a different response “TinyCLR”. Firmware update is a separate section. Rev. 2.06 TFT Page 45 of 102 www.ghielectronics.
GHI Electronics,LLC Embedded Master User Manual Getting Started with Embedded Master 6.8. Embedded Master Library Make sure you have the correct library included with your firmware. Otherwise, it will not load correctly. Embedded Master adds many functionalities on top of the .NET Micro Framework 3.0. For example, hardware peripherals such as CAN, Analog converters, PWM, ... are not supported in Micro Framework. However, they can be easily used with Embedded Master library.
GHI Electronics,LLC Embedded Master User Manual Getting Started with Embedded Master 3. Select Browse Tab, and select the library DLL file and click OK. 4. We can now see the new Assembly reference with the References in the solution explorer. We are ready to write the first application. Rev. 2.06 TFT Page 47 of 102 www.ghielectronics.
GHI Electronics,LLC Embedded Master User Manual Getting Started with Embedded Master 6.8.2 Example Application with GHI Library This example reads the ADC using the library. using System; using Microsoft.SPOT; using System.Threading; using GHIElectronics.Hardware; namespace MyConsoleApp { public class Program { public static void Main() { Debug.Print("Amazing Framework!"); // Make new ADC with range of values [0, 1023] AnalogIn a0 = new AnalogIn(AnalogIn.AnalogInputPin.
GHI Electronics,LLC Embedded Master User Manual Developing with the Emulator 7. Developing With The Emulator .Net Micro Framework has a powerful emulator that can be extended or changed to suite the developer needs. This is very useful as you can do much of the development and testing before building the actual hardware. Embedded Master has an emulator available that maps the buttons and LCD dimensions as provided on the Development System.
GHI Electronics,LLC Embedded Master User Manual Developing with the Emulator Rev. 2.06 TFT Page 50 of 102 www.ghielectronics.
GHI Electronics,LLC Embedded Master User Manual Updating Embedded Master Firmware 8. Updating Embedded Master Firmware Embedded Master includes GHI Loader, TinyBooter and TinyCLR which are three separate programs and they might have different version numbers. 8.1. Updating Firmware (TinyCLR) using MFDeploy Embedded Master Module implements a software from Microsoft, called TinyBooter. This software can be used to update the Embedded Master firmware.
GHI Electronics,LLC Embedded Master User Manual Updating Embedded Master Firmware If the firmware is running and you ping using MFDeploy, you will get a different response “TinyCLR”. Now, click “Browse...” button and direct MFDeploy to firmware HEX files (“CLR.HEX”...etc). The other files with “sig” extension must exist in the same folder where the HEX files are. We can now start deploying the firmware by clicking “Deploy” Loading the files takes about one minute.
GHI Electronics,LLC Embedded Master User Manual Updating Embedded Master Firmware At power up, a GHI bootstrap and loader take over the processor and validates TinyBooter stored in FLASH. If TinyBooter was found and was valid, execution is transferred to TinyBooter, and from there to .NET Micro Framework. This piece of software is also accessible by user and provides many useful commands that help updating the Tinybooter. check GHI Loader section for more details.
GHI Electronics,LLC Embedded Master User Manual GHI Loader 4. In the terminal window keep sending “%” character continuously and quickly. Note the quotes are used here just to isolate the character. Also, instead of using the “%” key, this can be done by holding the Up, Down and Select buttons. 5. While doing step 4, reset Embedded Master Module. If using the development system then press the reset button. 6.
GHI Electronics,LLC Embedded Master User Manual GHI Loader Command Description V Get GHI Loader version number E Erase all memory. Should NOT be used, unless, the user is sure that this step is needed. X Load new TinyBooter. See details below. N Display serial number R Run TinyBooter (exit GHI loader) Before updating TinyBooter, it would be very wise to check and write down the version numbers of everything, assuming the device is functional. 1. The .
GHI Electronics,LLC Embedded Master User Manual GHI Loader terminal software that is tested to work with GHI Loader is “TeraTerm Pro”. A working version of this program is available on our website (recommended). Rev. 2.06 TFT Page 56 of 102 www.ghielectronics.
GHI Electronics,LLC Embedded Master User Manual Selecting the Debug Interface 10. Selecting The Debug Interface Embedded Master Module connects to Visual Studio through Ethernet, USB or one of the four available serial ports. By default, USB is selected, however, the user is able to select any desired interface through a simple method call to GHI driver (refer to Miscellaneous Hardware Access, GHIElectronics.Hardware.Misc.SetDebugInterface). The setting is automatically saved in non-volatile memory.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library 11. Hardware And Software Library There are many libraries included with Embedded Master. This section will give a full description of Embedded Master Hardware and peripherals and a general overview on the related libraries and what is supported. Developers should consult the library reference, which is is in a separate document. 11.1. Graphics The TFT version of Embedded Master Module adds an interface for TFT displays.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library 11.1.1 Non-TFT version SPI LCD interface Embedded Master Modules also support low-cost low-resolution displays. The module has a dedicated SPI2 bus to transfer the video buffer to the display. Some applications may require large color displays. These displays, such as TFT LCD, require a lot of RAM and an LCD controller from the system. Embedded Master TFT version supports these TFT LCDs.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library Example // make a new bitmap Bitmap myBitmap = new Bitmap(SystemMetrics.ScreenWidth, SystemMetrics.ScreenHeight); // draw a rectangle myBitmap.DrawRectangle(Color.White, // color 1, // outline thickness 10, 10, // x, y 60, 50, // width, height 0, 0, // x, y corner radius Colors.Black, // gradient start color 10, 10, // gradient start Colors.White, // end color 80, 60, // gradient end 255); // opacity myBitmap.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library Example using Microsoft.SPOT.Hardware; namespace MyNamespace { class Program { public static void Main() { // Make E40 output with a low initial value OutputPort outPin = new OutputPort(EmbeddedMaster.Pins.E40, false); // make it high outPin.Write(true); Thread.Sleep(Timeout.Infinite); } } } Reference Microsoft.SPOT.Hardware.Port Microsoft.SPOT.Hardware.OutputPort Microsoft.SPOT.Hardware.TristatePort Microsoft.SPOT.Hardware.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library PIN# TFT# Name Description 37 47 SPI1_MOSI SPI1 Master Out Slave In 38 48 SPI1_MISO SPI1 Master In Slave Out 39 49 SPI1_SSEL SPI1 Slave Select 40 50 SPI1_SCK SPI2 Pin-out Description SPI1 Serial Clock User cannot use SPI2 if it is used by the SPI-based Embedded Master LCD Driver.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library spi.Write(data); Thread.Sleep(Timeout.Infinite); } } } Reference Microsoft.SPOT.Hardware.SPI 11.4. I2C A good way to access multiple devices is through using I2C. Using only 2 open-drain wires SCL (Serial Clock) and SDA (Serial Data), a master can access many slaves using their address. When a master needs to send data on the bus, it sends out a 7-bit address of the slave it wants to communicate with.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library Reference Microsoft.SPOT.Hardware.I2CDevice 11.5. UART One of the oldest and most common protocols is UART (or USART). TX is the serial data transmitted and RX is the data received. UART is actually what is used on serial (COM) ports on computers. The difference between UART on Embedded Master and a serial port on a PC is that Embedded Master’s UART pins have 3.3V TTL levels where the PC uses RS232 levels.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library ● UART0 (COM1) ● UART1 (COM2) This port includes hardware handshaking pins (CTS/RTS) ● UART2 (COM3) ● UART3 (COM4) This port includes IrDA capabilities. ● Also, the user is able to have many more COM ports using USB serial chipsets. For example, there are many USB <--> Serial cables available and these can be connected directly to Embedded Master. Check Supported Devices Section.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library // divisor and fraction for baudrate 921600 // see LPC2468 User Manual for details uint divisor = 4; uint frac = ((9 << 4) | 2); uint i; // open serial port at any baudrate (COM2) SerialPort port = new SerialPort("COM2", 115200, Parity.None, 8, StopBits.One); port.ReadTimeout = Timeout.Infinite; port.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library 11.7. Analog Inputs/Outputs The 7 (4 on the Non-TFT version) analog inputs continuously convert the analog value on a particular pin and store the value in a local register. This is only activated after an analog input object is created in the managed application. The analog inputs are 10-bit resolution with 3.3V reference taken from input power.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library Example Analog Output // Use analog output, initial output value is 500. The user would write values with // a minimum of 100 and maximum of 2000 AnalogOut analogOutput = new AnalogOut(500, 100, 2000) // write 2000, this gives maximum value to the output pin analogOutput.Write(2000); Reference GHIElectronics.Hardware.AnalogIn GHIElectronics.Hardware.AnalogOut 11.8.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library Reference GHIElectronics.Hardware.PWM 11.9. Processor Register Access Embedded Master Module allows direct access to the LPC2468/78 registers. The user can write, read or manipulate the bits as needed. This can be very useful to enable some features that are not already exposed. For example, IrDA capabilities. This feature is intended for advanced user only. GHI is not responsible for misusing these functionalities.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library DHCP (dynamic) IP and Static IP are supported by Embedded Master. If using dynamic IP, Embedded Master will try to get one at power up. This can take several seconds to obtain an IP address. Note that if Ethernet cable is not plugged in or the your network doesn't support DHCP then this will fail in a longer time. At power up, the LCD shows if Embedded Master is trying to obtain an IP address.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library Reference System.Net Microsoft.SPOT.Net 11.11. CAN Controller Area Network is a very common interface in industrial control and automotive. CAN is very robust and works very well in noisy environments at high speeds. All error checking and recovery methods are done automatically on the hardware. TD (Transmit Data) and RD (Receive Date) are the only 2 needed pins.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library Example // Initialize CAN channel, set bit rate CAN canChannel = new CAN(CAN.CANChannel.Channel_1, 0x001C000B); // make new CAN message CAN.CANMessage message = new CAN.CANMessage(); // make a message of 8 bytes for (int i = 0; i < 8; i++) message.data[i] = (byte) i; message.DLC = 8; // 8 bytes message.ArbID = 0xAB; // ID message.isEID = false; // not extended ID message.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library PIN# TFT# Name Description 32 42 USB_DEVIC_DP USB Device Data Plus 31 41 USB_DVICE_DM USB Device Data Minus 26 26 USB_VBUS (P1.30) USB Device power detect. Connect to power pin on USB connector. Note: Usually USB VBUS signal is used to detect the USB physical connection thus it can can be connected to any GPIO pin to detect the USB cable is connected or not.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library Windows might save the device information in its registry. Therefore, if you change the USB device settings/Interfaces and connect it again, it might not work correctly. Make sure to be careful with changing your USB device settings. Also, you might need to delete the all settings from Windows registry manually. • By default, Micro Framework debug interface is USB.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library 11.13. Storage Devices (SD, USB) / FAT File System FAT File System lets you create and manipulate files and folders on the connected SD and USB storage devices. In Micro Framework V2.5, GHI offered its own FAT32/16/12 system stack and developers were able to use SD cards and USB thumb drives to write reliable files/folder on these storage devices. With Micro Framework V3.0, FAT32 is supported by MFW itself.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library inserted and detected on your .Net Micro Framework device. Refer to USB Host section. Similar to SD cards, the user would be interest in mounting / unmounting the file system on the USB drive automatically when a USB drive is inserted or ejected. To do this, you can get events from Embedded Master about connection / disconnection of USB devices and call mount, unmount appropriately.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library Notes: • Current implementation supports multiple devices but only one USB Hub can be detected. A USB Hub has a maximum of 7 devices. Therefore, a USB Hub and seven USB devices can be used. • Only supports one Interface per device (Several Interfaces might be present in a device). • Device Connection/Disconnection events are sent per device and each device has a unique ID among the other connected devices.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library using GHIElectronics.System; using GHIElectronics.System.SystemDevices; namespace MyNamespace { class Program { public static void Main() { // a mouse Mouse mouse; // must start system first, no event is associated SystemManager.Start(null); // get a list of devices Device[] devices = SystemManager.GetDevices(); // look for a Mouse and initialize it. foreach (Device device in devices) { if (device.deviceType == DeviceType.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library using GHIElectronics.System; using GHIElectronics.System.SystemDevices; using System.Threading; using Microsoft.SPOT; namespace MyNamespace { class Program { public static void Main() { // must start system first with an event registered SystemManager.Start(DevicesUpdate); // the system does nothing if there is no devices Thread.Sleep(Timeout.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library examples included in SDK. Note that you should have an understanding of the USB specifications in order to use this functionality (www.usb.org). 11.14.2 USB Mass Storage (Thumb Drive) USB memory devices are supported and work with Micro Framework file system, please refer to Storage Devices section for reference. 11.14.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library using GHIElectronics.System; using GHIElectronics.System.SystemDevices; using System.Threading; using Microsoft.SPOT; namespace MyNamespace { class Program { public static void Main() { // must start system first with an event registered SystemManager.Start(DevicesUpdate); // the system does nothing if there is no devices Thread.Sleep(Timeout.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library 11.14.4 USB Mouse Embedded Master has direct support for Mice. The user simply connects a USB mouse to the system. It is found by checking the connection status of system devices. Each connected Mouse holds information about the current pressed buttons and the current position. Scaling First, the user has to set the scale of the mouse axes. This is the range of reported mouse movements as the user move the mouse around.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library Example Initialization of a mouse: // *mouse* is connected and *device* refers to the system device, mouse. mouse = new Mouse(device); // event for disconnection mouse.Disconnected += MouseDisconnected; // Set scale mouse.SetScale(-screen.Width / 2, screen.Width / 2, -screen.Height / 2, +screen.Height / 2, -512, 512); // Set cursor range mouse.SetCursorBounds(0, screen.Width, 0, screen.Height, 0, screen.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library 11.14.5 USB Keyboard Keyboards are directly supported. They are found by checking the connection status of system devices. Keyboard LEDs are currently not supported. Key Enumeration Holds definitions for all keys on a standard US-English keyboard. For example: Key.A // Refers to 'A'. Also 'a' is mapped to the same key Key.F1 // Refers to F1 key Key.D1 // Refers to the '1' key. Note this is also the '!' Key.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library // *keyboard* is connected and *device* refers to the system device, keyboard. Keyboard keyboard = new Keyboard(device); // Event when the keyboard is disconnected keyboard.Disconnected += KeyboardDisconnected; // Event when a key is pressed keyboard.KeyDown += KeyDown; // Event when a key is pressed and can be mapped to an ASCII character keyboard.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library Buttons Joysticks can have many buttons and they are mapped to index '0', to 'number to keys – 1'. The buttons are ordered in their significance. The most significant is button index 0. At any time, the user can check the status of a button using: Joystick.GetButtonState(0); // state of the first button Joystick.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library 11.15. Miscellaneous Hardware Access Several special access functions are available to the user to change some settings. For example, changing the used LCD type or debugging interface for .NET Micro Framework Example Changing the used LCD Misc.SetLCDType(Misc.LCDTypes.OSRAM_OS128064PK27MY); Reference GHIElectronics.Hardware.Misc 11.16.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library 11.17. Power Control / Sleep Hibernate is supported to save power. In this mode all clocks are stopped. This feature should be used by advanced users only. The user must disable peripherals such as USB Device and CAN before hibernating and re-enabling them after waking up, as needed. LPC24xx data sheet should be used as a reference. Hibernation mode is entered by calling Utility.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library 11.18. PPP Using this feature, the user can create sockets and do communications over links that are not Ethernet, such as, serial or wireless links. This feature provides two types of PPP communications: The first type is a non-authentication connection between two Embedded Master devices through Serial Ports or USB to Serial devices. Using this feature you can use Micro Framework TCP/IP stack over links other than Ethernet.
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library 11.19. In-Field Update GHI offers In-Field update feature on Embedded Master (not available on USBizi). Using this feature, the user can update the GHI firmware or the managed application over the Internet, USB or any possible way to get the firmware files. Although, extensive testing is done on this feature, the user must take caution that it may fail in certain situations (for example a power loss).
GHI Electronics,LLC Embedded Master User Manual Hardware and Software Library GHI Electronics LLC is ZeroG authorized design partner: http://www.zerogwireless.com/partners/partnersdevelop.html Note: currently more than one interface is not supported. the user must choose Ethernet or Wifi from managed code. the default interface is Ethernet. References GHIElectronics.System.Net.Interface Rev. 2.06 TFT Page 91 of 102 www.ghielectronics.
GHI Electronics,LLC Embedded Master User Manual SideShow Support 12. SideShow Support Microsoft has added many new features to Windows Vista. SideShow is one of the exciting features for the embedded world. Embedded Master Module TFT version is ideal for SideShow devices. Rev. 2.06 TFT Page 92 of 102 www.ghielectronics.
GHI Electronics,LLC Embedded Master User Manual Custom Native Drivers 13. Custom Native Drivers Managed code is safer for the system than native code. Programmers do not have to worry about memory leaks or uninitialized pointers anymore. These nice features come with a performance penalty. Depending on the application, speed may not be an issue. GHI Electronics has proven experience with customizing Micro Framework with extended functionality.
GHI Electronics,LLC Embedded Master User Manual Custom Native Drivers one support by Embedded Master but it uses a different initialization settings. Or slower clock rate. The developer can use the GHI library to access the processor registers and reinitialize the display with correct settings and even change the SPI clock rate. This is also valid for TFT displays where a developer may need to change the timing characteristics of the TFT signals. Rev. 2.06 TFT Page 94 of 102 www.ghielectronics.
GHI Electronics,LLC Embedded Master User Manual Supported Devices 14. Supported Devices Embedded Master™ supports many devices through SD/MMC, USB and the may other peripherals (SPI, I2C, UART, etc.) Many devices use defined “Classes” that are already supported by Embedded Master. For example, this web link contains the approved USB classes www.usb.
GHI Electronics,LLC Embedded Master User Manual Supported Devices SDHC (SD High Capacity) is newer version of SD cards. SD has a limit of 2 GB. SDHC solved this problem by converting byte addressing to sector addressing. Embedded Master supports MMC, SD, mini SD, micro SD and SDHC memory cards. Eye-Fi Eye-Fi is an SD card with built-in WiFi. Using Embedded Master, a user can log data to the SD Card (Eye-Fi), as regular SD card.
GHI Electronics,LLC Embedded Master User Manual Supported Devices USB Mass Storage (Thumb Drive, Hard Disk) This standard USB class of devices, Mass Storage, includes media devices that can be used to store data such as files/folders for later retrieval. This includes USB hard drives, USB thumb drives and USB memory card readers. Other devices, like MP3 players and digital cameras are usually based on this class.
GHI Electronics,LLC Embedded Master User Manual Supported Devices keyboard buttons being pressed. So, this kind of Barcode readers can be used with Embedded Master as well. USB CDC (Modems, Cellphones) Most modems and cell phones uses USB CDC ACM. This is Communication Device Class which enables the users to send and receive data easily through the modem or cellphone. Also supported by Embedded Master. Embedded Master only handles communications back and forth over USB.
GHI Electronics,LLC Embedded Master User Manual Supported Devices Postscript. Note that low cost printers do not have any available scripting. Sometimes these are called “Windows only” printers. The reason behind the low cost is that the processor on these printers is very simple, it gets pre-processed data from windows. The printer driver software is actually what processes the image/text on the host PC and then sends final data to the printer.
GHI Electronics,LLC Embedded Master User Manual Supported Devices USB GPS USB GPS devices do not have a specific class but since original GPS devices are serial devices, it would make sense to develop USB GPS devices that will show on Windows as a virtual COM port. This way, any existing software that uses serial GPS devices can use USB GPS devices as well. We have tested a couple of these GPS device and they had Prolific chipset inside.
GHI Electronics,LLC Embedded Master User Manual Supported Devices USB Webcam Webcams are a quick easy way to capture low quality images. Since all requests we have received to support webscams were for hobby projects, adding this feature is low priority. If there is an urgent need for webcams in a commercial project, please contact us with details on your project. Smart Card Reader Smart Cards are pocket-sized cards with integrated chips that can hold various information about the user.
GHI Electronics,LLC Embedded Master User Manual Appendices Licensing Embedded Master module is fully licensed for commercial use. The module price covers the commercial use of Embedded Master Module with .Net Micro Framework and a licensed MAC address. Disclaimer IN NO EVENT SHALL GHI ELECTRONICS, LLC.