Netduino RS232
#1
Posted 16 November 2010 - 08:00 PM
#2
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
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 !
#4
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
Posted 16 November 2010 - 08:30 PM
#6
Posted 16 November 2010 - 08:41 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.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
#7
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
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.
#9
Posted 17 November 2010 - 06:54 AM
#10
Posted 17 November 2010 - 03:33 PM
There is a SerialPort class in .NETMF that you can use. If you are using pins D0/D1 then you want to specify 'COM1'.Does anybody has some example how to get the Serial Interface running, or does the arduino code also apply here?
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
Posted 20 November 2010 - 01:25 AM
#12
Posted 25 March 2011 - 07:42 AM
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
- skobyjay likes this
#13
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
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