Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Creating a COM port for serial communication with Netduino GO!

netduino Go! COM port serial communication

  • Please log in to reply
5 replies to this topic

#1 DaveFer

DaveFer

    Member

  • Members
  • PipPip
  • 21 posts
  • LocationAustin, TX

Posted 26 December 2014 - 04:59 AM

Hi all -

 

I apologize in advance if this question is mis-categorized or redundent.

 

HOW can I add a COM port to Windows 7 / Windows 8 to do serial communication with my Netduino Go!?

 

I have implemented serial communications on my Netduino GO! and it seems to be working. (COM1, 2400, 8N1)

 

On the host machine I am trying to use Putty.exe to receive and send serial text to the Netduino. (I have used Putty.exe for hundreds of hours at work so I know how to configure it.)

 

When I try to open COM1 in Putty, it tells me that if unable to connect to COM1. In short, there are no COM ports available to connect to. Changing the COM port specification in Netduino doesn't help ... other selections produce a runtime exception. Those that don't are not found on my computer.

 

On my host laptop, there are no COM ports visible in Device Manager. (Yes, I've enabled Show Hidden Devices.)

 

I have used Putty on both my laptops to communication with other microprocessors ... I'm surprised I'm having this problem with Netduino.

 

Can someone tell me how to config / enable / add a COM port to my laptop to facilitate serial communications with my Netduino Go!?

 

Thank you!

 

    - Dave Ferreira



#2 Zoot

Zoot

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 26 December 2014 - 06:07 PM

Hi Dave,

 

If you have no COM ports in your laptop, you'll have to use something like a USB to serial adapter to provide a COM port that can talk to the Netduino.  Once you have the COM port set up, it's a matter of connecting it to the Netduino, and selecting the proper port on the laptop.  Putty should then work fine.

 

Note that you don't have to change the COM port on the Netduino.  COM 1 is fine for it.  A USB to serial adapter on your laptop will probably show up as COM 3 or COM 4, but there is not a requirement to have the Netduino port be the same number as the PC's port.  They are two separate entities and the port numbers won't usually correspond with each other.  The Netduino's port will be invisible to the PC, all you will see is the USB to serial adapter's port, and when the two are connected, you should have communication if the parameters are right, but you won't actually "see" the Netduino in Device Manager.

 

I hope that made some sense.  Post back if anything is unclear.



#3 DaveFer

DaveFer

    Member

  • Members
  • PipPip
  • 21 posts
  • LocationAustin, TX

Posted 26 December 2014 - 09:14 PM

Hi Zoot -

 

First, thanks for taking the time to carefully read and understand my question. I appreciate it. I just have couple points I need to clarify:

 

When you refer to a USB to serial adapter, are you referring to a cable? (USB to 24-pin serial physical adapter?) Can't I just do this with my USB cable? (If not, I will probably scratch this feature.)
 

When the Netduino is connected by USB, I DO see the Netduino device under USB devices. But I am unable to configure any COM port for it. (I believe other USB evaluation boards allow you to config a COM port in Dev Mgr under the USB device, but I may be wrong.)

 

Also, I have worked with other eval board (TI MSP430 and Stellaris) on this both of my machines and the used Putty via COM port (#?) to connect Putty to their UART (serial text buffer). All via USB cables. Now I cannot find those COM ports ... this puzzles me but is, perhaps, a distraction.

 

THANKS a ton!

 

    - Dave Ferreira



#4 Zoot

Zoot

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 26 December 2014 - 11:52 PM

Yes.  I'm referring to a USB to 9 pin serial cable adapter.  It allows your USB port to function as a serial COM port with an assignable (usually) COM port number.  It behaves just as though you have a serial port on your laptop, and allows you to talk to a serial port implemented on a Netduino or other hardware (PIC, Arduino, anything with a hardware serial port and internal UART).

 

The problem that you're running into is that (to my knowledge, and someone please correct me if I'm wrong), the USB port on the Netduino cannot be used for serial communication in it's native form.  You would have to write a library to allow the USB port to function as a serial device.  It could be done, (I think), but it would knock out the debugging functions of the Netduino, as it can't function as a USB device and a serial device at the same time.  I can't verify this at the moment, as I can't find the code I was looking for on my PC, so I could be entirely wrong about this.

 

The TI and Stellaris boards may have had a serial monitor implemented in their firmware which allowed you to connect with Putty through USB, but to my knowledge, the Netduino does not allow this.  I currently have a Netduino attached to my PC spitting out a serial stream, and I can't connect to the stream with Putty.  Also, I don't have a serial port in Device Manager to connect to.  The only way that I was able to connect to the serial stream was to use my USB to serial converter.



#5 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 27 December 2014 - 11:05 AM

You need a USB to TTL converter to create a a serial port on the PC which can then be connected to the serial ports on the Netduino Go (I'm assuming that you are using the COM ports on the Shieldbase).  These are been based on FTDI or equivalent chips.

 

Some things to be aware of:

  1. Netduino COM ports work on 0-3.3V logic levels.  These are different from classic COM ports on PCs which use upto +/-15V to represent 0 & 1
  2. The COM on the Shieldbase should be 5V tolerant for incoming signals but will only be able to output 3.3V for logic 1.

Hope this helps,

Mark


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#6 Zoot

Zoot

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 27 December 2014 - 06:20 PM

You need a USB to TTL converter to create a a serial port on the PC which can then be connected to the serial ports on the Netduino Go (I'm assuming that you are using the COM ports on the Shieldbase).  These are been based on FTDI or equivalent chips.

 

Some things to be aware of:

  1. Netduino COM ports work on 0-3.3V logic levels.  These are different from classic COM ports on PCs which use upto +/-15V to represent 0 & 1
  2. The COM on the Shieldbase should be 5V tolerant for incoming signals but will only be able to output 3.3V for logic 1.

Hope this helps,

Mark

Thank you Mark, that is what I was trying to say but failed miserably, lol.

 

I knew I was forgetting something.







Also tagged with one or more of these keywords: netduino Go!, COM port, serial communication

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.