Serial TTL with Fez Spider

I am having problems finding information on doing serial TTL communications on the Fez Spider. I’m trying to send serial commands to a motor controller. The communication is one way only, out of the Spider. Can someone point me in the right direction?

Do you have a hardware or a software question?

Software. I searched for UART or TTL and everything I find is for .Net in Windows.

Did you search here? :slight_smile:

search for COM1 in the code site, or step through the serial port tutorials in the link Gus sent.

TTL means it’s not necessary to go to a RS232 serial signalling chip which means your device can connect and communicate to the Fez without anything more than a cable.

(beyond my practical experience but this is my attempt for bonus points: on a Spider, you need a type U port )

Based on what I have found, if I were to use pin 4, on spider’s socket 8,which is TXD2 would it be referred to as COM3 in code? Is it okay to ignore pin 5, RXD2, on the same socket? I only need to send out data.

Take a look at Gadgeteer.Interfaces.Serial.

There is no “COM3” when you use this interface. Serial is supported on socket types U and K. With an extender module you can break out pins 4/5 and wire your device directly.

A quick example…

      // private members in this constructor are instantiated elsewhere
      var serial = new Gadgeteer.Interfaces.Serial(_socket, (int)_baudRate, GTI.Serial.SerialParity.None, GTI.Serial.SerialStopBits.One, 8, GTI.Serial.HardwareFlowControl.NotRequired, this);
      //good idea to pause a bit before writing

In order to get the COM port number for a given socket, have a look here and search for "COM:

Thanks guys, great information.