GHI electronics G120 Manuel utilisateur

GHI Electronics
G120 SoM User Manual
Rev. 0.10 March 20, 2015 User Manual
G120 Module Top G120 Module Bottom
Document Information
Information Description
A stract This document covers information a out the G120
Module, specifications, tutorials and references.

GHI Electronics,LLC G120 SoM User Manual
Rev. 0.10 Page 2 of 67 www.GHIElectronics.com
Revision History
Rev No. Date Modification
Rev. 0.10 03/20/15 Corrected analog input again.
Rev. 0.09 03/19/15 Corrected analog input resolution.
Rev. 0.08 03/09/15 Corrected loader and firmware access interface.
Rev. 0.07 02/23/15 Corrected CAN2 pins and added E_TXEN.
Rev. 0.06 01/22/15 Added missing power and ground pins
Rev. 0.05 12/16/14 Pin and power description updates
Rev. 0.04 8/26/14 Preliminary version. Hi ernate power
Rev. 0.03 8/26/14 Preliminary version. Minor sync with EMX edits

GHI Electronics,LLC G120 SoM User Manual
Ta le of Contents
Table of ontents
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 Ta le........................................................................8
4.G120 on oot 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 De ug 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.Assem lies 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 Li raries...............................................................................31
7.1.Finding NETMF Li rary Documentation............................32
7.2.Loading Assem lies...........................................................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 Data ase.............................................................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 Loada le 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 ena les the SoM to e programmed from
Microsoft's Visual Studio, y simply using a USB ca le. Programming in a modern managed
language, such as C# and Visual Basic, allows developers to accomplish much more work in
less time y taking advantage of the extensive uilt-in li raries 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 ring 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 y its full .NET Framework, Microsoft developed a lightweight version called .NET
Micro Framework (NETMF).
NETMF focuses on the specific requirements of resource-constrained em edded systems.
Development, de ugging and deployment is conveniently performed using Microsoft's
powerful Visual Studio tools, all through standard USB ca le.
Programming is done in C# or Visual Basic. This includes li raries to cover sockets for
networking, modern memory management with gar age collector and multitasking services.
In addition to supporting standard .NET features, NETMF has em edded extensions
supporting:
●General Purpose IO (GPIO with interrupt handling
●Analog input/output
●Standard uses 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 een the lead Microsoft partner on .NET Micro Framework
(NETMF). The core NETMF was also extended with new exclusive li raries for an additional
functionality, such as data ase, USB Host and WiFi.
One of the important extensions y GHI Electronics is Runtime Loada le Procedures (RLP),
allowing native code (Assem ly/C) to e compiled and loaded right from withing managed
code (C#/Visual Basic) to handle time critical and processor intensive tasks. IT can also e
used to add new native extensions to the system.
As for networking, WiFi and PPP li raries are added y GHI Electronics to the NETMF core.
Com ined with Ethernet and the other managed services, it is a complete tool ox 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 e done through any of the availa le interface, including file system and
networking.
Rev. 0.10 Page 5 of 67 www.GHIElectronics.com

GHI Electronics,LLC G120 SoM User Manual
Introduction
1.3. G120 Module Key Features
●.NET Micro Framework
●120 MHz ARM Cortex-M3 processor
●16 MB RAM
●4 MB FLASH
●Em edded LCD controller
●72 GPIO Pins
●43 Interrupt Inputs
●2 SPI
●I2C
●4 UART
●2 CAN Channels
●8 12-Bit Analog Input
●10-Bit Analog Output
●4Bit SD/MMC Memory card interface
●12 PWM
●160 mA max
●18 mA Hi ernate Mode
●-40ºC to +85ºC Operational
●RoHS Lead Free
●Dimensions: (26.67 mm x 38.1 mm)
●TCP/IP Stack (.NET sockets)
●SSL secure networking
●WiFi
●PPP
●USB Host
●Graphics (image, font and controls)
●SQLite data ase
●File System (SD and USB Sticks)
●Native extensions RLP
1.4. Example Applications
●Vending machines, POS Terminals
●Measurement tools and testers
●Networked sensors
●Ro otics
●Central alarm system
●Smart appliances
●Industrial automation devices
Rev. 0.10 Page 6 of 67 www.GHIElectronics.com

GHI Electronics,LLC G120 SoM User Manual
The Hardware
2. The Hardware
The G120 Module core components includes the processor, 4.5MB flash, and 16MB RAM.
The small, 38.1 x 26.7 x 3.55 mm (only 1 x 1.5 inches), module contains everything needed to
run a complex em edded-system in a cost-effective and flexi le solution. All needed is a 3.3V
power source and some connections to take advantage of the G120 Module's long list of
availa le features.
2.1. LP 1788 Microcontroller
The LPC1788 microcontroller in the G120 Module, is an 120Mhz, 32Bit, Cortex-M3. It
incorporates:
●specialized flash memory accelerator
●a 3-stage pipeline
●a Harvard architecture with separate local instruction and data uses
●an internal prefetch unit that supports speculative ranches.
The NETMF core li raries, com ined with the GHI Electronics extensions, provide a long list
of methods to access the availa le peripherals.
2.2. SDRAM
16MB of SDRAM comes standard with the G120 Module.
2.3. FLASH
4.5MB of external flash is availa le on the G120 Module. The fast zero-wait-state internal
0.5MB is used to execute the core services of the system to achieve the highest possi le
performance. The remaining 4MB of external memory is used to hold more extensions and to
store the user's end application. One of the li rary extensions provided allows the user
application to e updated in field, even remotely.
Rev. 0.10 Page 7 of 67 www.GHIElectronics.com

GHI Electronics,LLC G120 SoM User Manual
Pin-Out Description
3. Pin-Out Description
Many signals on the G120 Module are multiplexed to offer multiple functions on a single pin.
Developers can decide on the pin functionality through the provided li raries. These are some
important facts pertaining to the availa le pins:
●Pins with GPIO feature default to inputs with internal weak pull-up resistors
●GPIO pins are 3.3V levels ut 5V tolerant
●Pins with analog feature are not 5V tolerant when the analog function is used
●Only GPIO pins on ports 0 and 2 are interrupt capa le
●Advanced details on all pins can e found in the LPC1788 datasheet from NXP
we site
3.1. Pin-out Table
G120 GPIO Multiplexed Function(s) Notes
1 GROUND Ground pin
2 3.3V Power pin
3 P2.4
PWM_10
LCD_EN
4 P2.8 LCD_R3
5 P0.0 CAN1_RD
6 P0.10 COM3_TXD
7 P2.11
8 P2.10 LDR0 Boot mode control
9 P0.11 COM3_RXD
10 P0.1 CAN1_TD
11 P0.18 SPI1_MOSI
12 P0.16 COM2_RXD
13 P0.15 SPI1_SCK
14 P0.22 LDR1 Boot mode control
15 P0.17
COM2_CTS
SPI1_MISO
16 P2.1 MODE
USB vs COM1 de ug
access interface
17 P0.6 COM2_RTS
18 P2.0 COM2_TXD
19 SPI2_SCK No GPIO
Rev. 0.10 Page 8 of 67 www.GHIElectronics.com

GHI Electronics,LLC G120 SoM User Manual
Pin-Out Description
G120 GPIO Multiplexed Function(s) Notes
20 SPI2_MISO No GPIO
21 SPI2_MOSI No GPIO
22 P1.12 SD_DAT3
23 P1.11
PWM_5
SD_DAT2
24 P1.7
PWM_4
SD_DAT1
25 P1.2
PWM_0
SD_CLK
26 P1.6
PWM_3,
SD_DAT0
27 GROUND Ground pin
28 P1.3
PWM_1
SD_CMD
29 P0.5 CAN2_TD
30 P0.4 CAN2_RD
31 P4.28 COM4 TXD
32 P4.29 COM4 RXD
33 P1.14 E_RXER
34 P1.17 E_MDIO Internal RMII interface
35 P1.16 E_MDC is exposed ut not
36 P1.15 E_RXCLK supported.
37 P1.9 E_RXD0
38 P1.10 E_RXD1
39 P1.4
SPI3_MISO
E_TXEN
40 P1.8 E_CRS
41 P1.1
SPI3_MOSI
TOUCH_XR
42 P1.0
SPI3_SCK
TOUCH_YD
43 SWDCK Do not connect
44 SWDIO Do not connect
45 GROUND Ground pin
46 3.3V Power pin
47 P0.3 COM1 RXD
48 P0.2 COM1 TXD
49 P0.26
ANALOG_3
ANALOG_OUTPUT_0
Rev. 0.10 Page 9 of 67 www.GHIElectronics.com

GHI Electronics,LLC G120 SoM User Manual
Pin-Out Description
G120 GPIO Multiplexed Function(s) Notes
50 P0.24
ANALOG_1
TOUCH_YU
51 P0.25 ANALOG_2
52 P0.23
ANALOG_0
TOUCH_XL
53 RESET Processor reset, active low
54 P3.26 PWM_8
55 P0.13 ANALOG_7
56 P0.12 ANALOG_6
57 RTCX1 Real Time Clock crystal
58 RTCX2 Real Time Clock crystal
59 P1.30 ANALOG_4 The GHI Boot Loader will
not function properly if this
pin is low on power up.
60 VBAT Real Time Clock attery
61 P0.28 I2C_SCL Open-drain pin
62 P1.31 ANALOG_5
63 P0.27 I2C_SDA Open-drain pin
64 P3.25 PWM_7
65 P3.24 PWM_6
66 USB_Device_D+
67 USB_Device_D-
68 USB_Host_D-
69 USB_Host_D+
70 P2.21
71 P1.22 LCD_G2
72 P1.21 LCD_G1
73 P1.19
74 P1.23 LCD_G3
75 P1.24 LCD_G4
76 P1.20 LCD_G0
77 P1.25 LCD_G5
78 P1.26 LCD_B1
79 P1.28 LCD_B3
80 P1.29
LCD_B4
COM5_TXD
81 GROUND Ground pin
82 P1.27 LCD_B2
83 P2.13 LCD_B0
84 P2.12 LCD_R0
Rev. 0.10 Page 10 of 67 www.GHIElectronics.com
Table des matières
Autres manuels GHI electronics Unité de contrôle
Manuels Unité de contrôle populaires d'autres marques

Festo
Festo Compact Performance CP-FB6-E Manuel de la liste des pièces

Elo TouchSystems
Elo TouchSystems DMS-SA19P-EXTME Manuel utilisateur

JS Automation
JS Automation MPC3034A Manuel utilisateur

JAUDT
JAUDT SW GII 6406 Series Guide rapide

Spektrum
Spektrum Air Module System Manuel utilisateur

BOC Edwards
BOC Edwards Q Series Manuel utilisateur













