Main Site Documentation

Basic Understanding of where G120 Pins are mapped to hardware


#1

Have a Cobra II eco with socket 5 (u type) connected to rs232 module.
We are implementing NON gadgeteer code to communicate with a PC.

To instantiate a serial port these references are required:
Microsoft.Spot.Hardware
Microsoft.Spot.Hardware.SerialPort

The constructor can then be called as follows and I have a working serial port.

System.IO.Ports.SerialPort = new System.IO.Ports.SerialPort(“COM1”, 115200, System.IO.Ports.Parity.None, 8, System.IO.Ports.StopBits.One);

QUESTION:
Where do the CPU pins (P0.3/RXD1 & P0.2/TXD1) get mapped to COM1?


#2

Pins are mapped inside firmware code. You can take a look how it is done by installing NETM Porting Kit


#3

So the references point to Microsoft code…How does GHI modify these assemblies?
Will porting kit point this out? Where is firmware source at?


#4

@ mhardy - When we create the firmware for the G120, we map the pins to COM1. We do not make those sources public though, as andre.m pointed out. The C# assemblies you are using call into the native code we compile for the firmware.


#5

Hi John -

Where does the firmware reside, i.e. is it part of the SDK, is it pre-loaded into flash?
What’s the name of the file(s).

The reason I ask is because we are building a board based on G120 and I need to figure out how to get all the peripherals working, such as:

2-serial ports
1-can port
1-ethernet
1-sd card
1-USB client
1-USB host
11-digital inputs
2-digital outputs
4-analog inputs


#6

@ mhardy - You can find the firmware under C:\Program Files (x86)\GHI Electronics\GHI NETMF v4.3 SDK\Firmwares\G120. It is part of our SDK and you load it onto your device when an update is available.

You can find guides to all of the peripherals you mentioned under https://www.ghielectronics.com/docs


#7

@ mhardy - Although you may already be doing this… One way to help you would be to use the Pin out table in the G120 manual ( https://www.ghielectronics.com/downloads/man/G120_User_Manual.pdf ) and also the schematic for the FEZ Cobra II Eco ( http://www.ghielectronics.com/downloads/schematic/FEZ_Cobra_II_SCH.pdf ) The names map to the available NETMF peripherals. The datasheet may also be of help – search internet for LPC1788.


#8

Its pretty easy to use G120 in your custom board, and I find the Brochure to be most helpful for pin mappings

http://www.ghielectronics.com/downloads/man/G120_Module_Brochure.pdf

I just completed my custom board, my reasoning for using the G120 was because its easily hand solderable. Will post in creations section once I get more XP, not allowed yet.

btw. its a not ideal system…


#9

Good job! Looking forward to see your creation.


#10

Darko,

Thanks, the brochure is very handy, wish I knew about it prior to laying out our board!