GHI Electronics,LLC
G120 SoM User Manual
Table of Contents
Table of Contents
1.Introduction...................................................................................4
1.1.The .NET Micro Framework................................................4
1.2.GHI Electronics and NETMF...............................................5
1.3.G120 Module Key Features................................................6
1.4.Example Applications..........................................................6
2.The Hardware...............................................................................7
2.1.LPC1788 Microcontroller.....................................................7
2.2.SDRAM................................................................................7
2.3.FLASH.................................................................................7
3.Pin-Out Description.......................................................................8
3.1.Pin-out Table........................................................................8
4.G120 on boot up.........................................................................12
4.1.Boot Mode Pins.................................................................12
4.2.GHI Boot Loader vs. TinyBooter vs. G120 Firmware
(NETMF/TinyCLR)...................................................................13
4.3.The Loader and Firmware Debug Access Interface..........13
5.The GHI Boot Loader..................................................................14
5.1.The Commands.................................................................14
5.2.Updating TinyBooter..........................................................14
Updating TinyBooter using FEZ Config.............................15
Updating TinyBooter Manually..........................................17
Loading using XMODEM...................................................18
5.3.TinyBooter.........................................................................20
5.4.TinyCLR (firmware) Update Using FEZ Config.................21
5.5.Firmware Update Using MFDeploy...................................23
6.NETMF TinyCLR (firmware).......................................................26
6.1.Assemblies Version Matching...........................................26
6.2.Deploying to the Emulator.................................................27
6.3.Deploying to the G120 Module..........................................29
6.4.Targeting Different Versions of the Framework.................29
7.The Libraries...............................................................................31
7.1.Finding NETMF Library Documentation............................32
7.2.Loading Assemblies...........................................................32
7.3.Digital Inputs/Outputs........................................................34
Interrupt Pins.....................................................................37
7.4. Analog Inputs/Outputs......................................................38
7.5.PWM..................................................................................38
7.6.Signal Generator...............................................................39
7.7.Signal Capture...................................................................40
7.8.Serial Port (UART).............................................................41
7.9.SPI.....................................................................................42
7.10.I2C...................................................................................43
7.11.CAN.................................................................................44
7.12.One-wire..........................................................................45
7.13.Graphics..........................................................................45
Fonts..................................................................................47
Glide..................................................................................47
Touch Screen....................................................................47
7.14.USB Host.........................................................................48
7.15.Accessing Files and Folders...........................................49
SD/MMC Memory..............................................................51
USB Mass Storage............................................................51
7.16.Secure Networking (TCP/IP)...........................................51
The Extensions..................................................................51
MAC address setting.........................................................51
IP address (DHCP or static):.............................................52
Ethernet.............................................................................53
Wireless LAN WiFi............................................................54
7.17.PPP..................................................................................55
7.18.USB Client (Device) ........................................................55
7.19.Extended Weak References (EWR)................................57
7.20.Real Time Clock..............................................................57
7.21.Watchdog.........................................................................59
7.22.Power Control..................................................................59
7.23.In-Field Update................................................................61
7.24.SQLite Database.............................................................61
8.Advanced use of the Microprocessor ........................................63
8.1.Register.............................................................................63
8.2.AddressSpace...................................................................63
8.3.Battery RAM......................................................................63
8.4.EEPROM...........................................................................64
8.5.Runtime Loadable Procedure............................................64
9.design Consideration..................................................................65
Required Pins....................................................................65
Interrupt Pins.....................................................................65
SPI Channels....................................................................65
10.Soldering G120.........................................................................66
Legal Notice...................................................................................67
Licensing..................................................................................67
Disclaimer................................................................................67
G120 Module
Page 3 of 67
www.ghielectronics.com
GHI Electronics,LLC
G120 SoM User Manual
Introduction
1. Introduction
The G120 Module is a powerful, yet low-cost, surface-mount System on Module (SoM)
running the .NET Micro Framework software, which enables the SoM to be programmed from
Microsoft's Visual Studio, by simply using a USB cable. Programming in a modern managed
language, such as C# and Visual Basic, allows developers to accomplish much more work in
less time by taking advantage of the extensive built-in libraries for networking, file systems,
graphical interfaces and many peripherals.
A simple two layer circuit, with just power and some connectors, can utilize the G120 Module
to bring the latest technologies to any products. There are no additional licensing or fees and
all the development tools and SDKs are provided freely.
1.1. The .NET Micro Framework
Inspired by its full .NET Framework, Microsoft developed a lightweight version called .NET
Micro
Framework (NETMF).
NETMF focuses on the specific requirements of resource-constrained embedded systems.
Development, debugging and deployment is conveniently performed using Microsoft's
powerful Visual Studio tools, all through standard USB cable.
Programming is done in C# or Visual Basic. This includes libraries to cover sockets for
networking, modern memory management with garbage collector and multitasking services.
In addition to supporting standard .NET features, NETMF has embedded extensions
supporting:
●
●
●
●
●
●
●
General Purpose IO (GPIO with interrupt handling
Analog input/output
Standard buses such I2C, SPI, USB, Serial (UART)
PWM
Networking
File System
Display graphics, supporting images, fonts and controls.
Rev. 0.10
Page 4 of 67
www.GHIElectronics.com
GHI Electronics,LLC
G120 SoM User Manual
Introduction
1.2. GHI Electronics and NETMF
For years, GHI Electronics has been the lead Microsoft partner on .NET Micro Framework
(NETMF). The core NETMF was also extended with new exclusive libraries for an additional
functionality, such as database, USB Host and WiFi.
One of the important extensions by GHI Electronics is Runtime Loadable Procedures (RLP),
allowing native code (Assembly/C) to be compiled and loaded right from withing managed
code (C#/Visual Basic) to handle time critical and processor intensive tasks. IT can also be
used to add new native extensions to the system.
As for networking, WiFi and PPP libraries are added by GHI Electronics to the NETMF core.
Combined with Ethernet and the other managed services, it is a complete toolbox for the
internet of things.
All the mentioned features are loaded and tested on the G120 Module. GHI Electronics
continuously maintains, upgrades and solves any of the issues on the G120 Module firmware,
to provide regular and free releases. Users can simply load the new software on the G120
Module using USB or Serial, and even use the in-field-update feature. This feature allows the
upgrade to be done through any of the available interface, including file system and
networking.
Rev. 0.10
Page 5 of 67
www.GHIElectronics.com