Main Site Documentation

Where is COM3 on the FEZ Domino?


#1

COM3, where is this port?

There seems to be an error on the documentation related to remapping A2 and A2. One is COM3 and the other is COM4.


#2

The docs should be correct. Where and how you think they are incorrect?


#3

An2 and An3 are special cases where they can be digital, analog or can be remapped to work as COM4, where
An2 is COM4 OUT and An3 is COM3 IN. Call the function below to remap COM4

an3 is com3?

is what i think he is talking about.


#4

We will double check and fix it.


#5

I think the first basic question is which pins are used for TX and RX as COM3 on the Fez Domino Board?

I would have to hunt though all the documentation to find the spot where something mentioned COM3/COM4. I do not remember where it was. Maybe in the forum.


#6

There is only one doc and it is only like 3 pages! Look at the downloads under FEZ Domino. All pin s are listed thereā€¦

Also, the board has labeling of all pins too


#7

As you can see in the documentation of the domino:

The COM3 is named COM4 there.

We have COM1 on Di0 and Di1.
We have COM2 on UEXT3, UEXT4, UEXT5, UEXT6
We have COM4 on remapped pins.

To do this:

Remapping COM4
An2 and An3 are special cases where they can be digital, analog or can be remapped to work as COM4, where
An2 is COM4 OUT and An3 is COM4 IN. Call the function below to remap COM4

// add this on top of your code
using GHIElectronics.NETMF.Hardware.LowLevel;
using System.IO.Ports;
//...
//...
// add this function anywhere
static public void RemapCOM4to_TXAn2_RXAn3(SerialPort ser)
{
// call this function **after** you open COM4 port
if (ser.PortName != "COM4" || ser.IsOpen == false)
throw new Exception("Only use COM4 and make sure it is open");
// remap COM4 RX (in) pin from P4.29/DIO17 to P0.26 (that is An3)
// remap COM4 TX (out) pin from P4.28/DIO13 to P0.25 (that is An2)

Register PINSEL9 = new Register(0xE002C024);
PINSEL9.Write(0);// COM4 is now disconnected from P4.28 and P4.29
Register PINSEL1 = new Register(0xE002C004);
PINSEL1.SetBits(0xf << 18);// COM4 is now connected to An3 and An4
}

Once the code above is added, you can use COM4 on An2 and An3 as shown below.

public static void Main()
{
SerialPort MyCOM4 = new SerialPort("COM4", 115200, Parity.None, 8, StopBits.One);
//MyCOM4.ReadTimeout = 1000;
MyCOM4.Open();
RemapCOM4to_TXAn2_RXAn3(MyCOM4);
byte[] helloBytes = Encoding.UTF8.GetBytes("Hello!");
// write data to COM4 which will be sent out on pin An2
MyCOM4.Write(helloBytes, 0, helloBytes.Length);
// .............
// .............
}

#8

That is incorrect. COM3 is not exposed on FEZ Domino but you still have 3 other COM ports


#9

Wrong expression on my side. My bad, sorry. But I guess he will understand what I mean. :smiley:


#10

OK, so there is no available COM3, its COM1, COM2, and COM4, skip COM3. There are three available COM ports, 1,2, and 4.

This might seem like a minor thing but its cost me a good bit of time. I thought there were 4 ports and drilled though all the documentation looking for COM3. The flaw where COM3 was mentioned fueled my thought that maybe there was a COM3 and it was not documented properly.

I wonder why you did not remap the port numbers so that you went COM 1, 2, 3 and keep the 4th port hidden.


#11

The usbizi chip does have 4 COM ports but not all pins are exposed on domino board.