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

Netduino RS232


  • Please log in to reply
13 replies to this topic

#1 Frank

Frank

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts
  • LocationNorth Waterboro Maine

Posted 16 November 2010 - 08:00 PM

While the following works for the mini, am I correct that this DOES NOT work for the Netduino and the Plus ?
Retired -stone sculptor -macro photographer- novice but avid Go player - Geek

#2 AlfredBr

AlfredBr

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationConnecticut, USA

Posted 16 November 2010 - 08:10 PM

While the following works for the mini, am I correct that this DOES NOT work for the Netduino and the Plus ?


From what I've read, the Mini can handle RS-232 levels (+12/-12) on one set of serial pins and TTL levels on the other. The Classic and the Plus take TTL only on all serial pins.

#3 Frank

Frank

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts
  • LocationNorth Waterboro Maine

Posted 16 November 2010 - 08:15 PM

From what I've read, the Mini can handle RS-232 levels (+12/-12) on one set of serial pins and TTL levels on the other. The Classic and the Plus take TTL only on all serial pins.


Yep, believe that is correct !

It's the Netduino and the Plus that I am not certain about.

Nicest Fall in Maine in years, and I'm sitting down cellar banging a keyboard. Ah, retired life !
Retired -stone sculptor -macro photographer- novice but avid Go player - Geek

#4 AlfredBr

AlfredBr

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationConnecticut, USA

Posted 16 November 2010 - 08:18 PM

Yep, believe that is correct !

It's the Netduino and the Plus that I am not certain about.


I am certain that you cannot connect RS-232 levels directly to the serial pins on the Classic or the Plus.

#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 16 November 2010 - 08:30 PM

You can use RS232 with the Netduino and Netduino Plus--but you'll need to use an RS232 shield. Here's one from CuteDigi: http://www.cutedigi....roducts_id=4329 Chris

#6 AlfredBr

AlfredBr

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationConnecticut, USA

Posted 16 November 2010 - 08:41 PM

You can use RS232 with the Netduino and Netduino Plus--but you'll need to use an RS232 shield.

Here's one from CuteDigi:
http://www.cutedigi....roducts_id=4329

Chris

I got a 'FTDI Basic Breakout - 5V' from http://www.sparkfun.com/products/9716 and wired the Tx/Rx/Gnd to the D0/D1/Gnd pins on the Netduino. I got the 5V version before I knew they had a version that is selectable to 3.3V, but I've had no problems at 5V on D0/D1. This has a FTDI USB to RS-232 on board, so you can plug right into your USB port.

#7 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 16 November 2010 - 08:44 PM

I got a 'FTDI Basic Breakout - 5V' from http://www.sparkfun.com/products/9716 and wired the Tx/Rx/Gnd to the D0/D1/Gnd pins on the Netduino. I got the 5V version before I knew they had a version that is selectable to 3.3V, but I've had no problems at 5V on D0/D1. This has a FTDI USB to RS-232 on board, so you can plug right into your USB port.


Awesome; thanks for posting about this. That's a great option as well.

And yes, you'll want to get a 3.3V version if you can. The Netduino's microcontroller can accept 5V signals--but it sends 3.3V signals. Many "5V TTL" converters can understand 3.3V signals, but some need higher voltage signals.

Chris

#8 Frank

Frank

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts
  • LocationNorth Waterboro Maine

Posted 16 November 2010 - 10:45 PM

Awesome; thanks for posting about this. That's a great option as well.

And yes, you'll want to get a 3.3V version if you can. The Netduino's microcontroller can accept 5V signals--but it sends 3.3V signals. Many "5V TTL" converters can understand 3.3V signals, but some need higher voltage signals.

Chris


Thanks to AlfredBr and Chris for good answers. My order for the cable is on the way from Adafruit!.
Nothing against Sparkfun, but I've used them twice and I thought I'd pass the wealth around to more of the
firms.
Retired -stone sculptor -macro photographer- novice but avid Go player - Geek

#9 darkside40

darkside40

    Member

  • Members
  • PipPip
  • 18 posts

Posted 17 November 2010 - 06:54 AM

Great these Brakeout Boards are also available in Germany. Does anybody has some example how to get the Serial Interface running, or does the arduino code also apply here?

#10 AlfredBr

AlfredBr

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationConnecticut, USA

Posted 17 November 2010 - 03:33 PM

Does anybody has some example how to get the Serial Interface running, or does the arduino code also apply here?

There is a SerialPort class in .NETMF that you can use. If you are using pins D0/D1 then you want to specify 'COM1'.
Here is an example (from memory, I cannot guarantee that this will work since I don't have .NETMF installed on this computer, but it should be close)

SerialPort port = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One);
port.Open();
string message = "Hello World";
byte[] bytes = Encoding.UTF8.GetBytes(message);
port.Write(bytes, 0, bytes.Length);
port.Close();

The above code will cause your Netduino to write 'Hello World' to its the serial port. You can read this on your PC with a terminal program listening to the serial port on your PC.

Keep in mind that the Netduino will have a COM port called COM1 or COM2 depending on what pins you are using on the Netduino. Your PC will have a COM port whose name will depend on what port Microsoft Windows assigns to the serial ports on your PC. On my computer, it always seems to assign it to COM3, but your experience may be different.

I hope this helps. If you have troubles getting this to work, post back and I'll try to post a better example.

#11 Frank

Frank

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts
  • LocationNorth Waterboro Maine

Posted 20 November 2010 - 01:25 AM

Got it working fine, using a CD4050 . Never misses a beat! Note: If you tie down the unused inputs, it never misses a beat. Took me a while to remember that one ! Now I can sit in Hyperterminal , send ASCII codes to get what I want , then duplicate it in code. Thanks for all the advice.
Retired -stone sculptor -macro photographer- novice but avid Go player - Geek

#12 demonGeek

demonGeek

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts
  • LocationCanada

Posted 25 March 2011 - 07:42 AM

I know this is an old thread but I came across it just now as I was trying to get RS232 up and running on my Netduino.

If you're looking for a really cheap board to do the conversion from TTL (3V) to RS232 you could try this one from Futurlec which is only $4.90 and is working fine with my Netduino.

- Adam

#13 FaizanKazi

FaizanKazi

    New Member

  • Members
  • Pip
  • 1 posts

Posted 04 May 2011 - 12:48 PM

Got it working fine, using a CD4050 . Never misses a beat!

Note: If you tie down the unused inputs, it never misses a beat. Took me a while to remember that one !

Now I can sit in Hyperterminal , send ASCII codes to get what I want , then duplicate it in code.

Thanks for all the advice.


Hi Frank! what do you mean by "tie down the unused inputs"?

#14 skobyjay

skobyjay

    Advanced Member

  • Members
  • PipPipPip
  • 53 posts

Posted 12 January 2013 - 05:08 PM

I know this is an old thread but I came across it just now as I was trying to get RS232 up and running on my Netduino.

If you're looking for a really cheap board to do the conversion from TTL (3V) to RS232 you could try this one from Futurlec which is only $4.90 and is working fine with my Netduino.

- Adam

 

can you post a picture of how to wire the TTL (3V) to RS232 board to the netduino?






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.