Serial communication between the Computer and the Netduino?
#1
Posted 22 August 2010 - 08:50 PM
#2
Posted 02 September 2010 - 11:09 PM
#3
Posted 02 September 2010 - 11:31 PM
This would be nice to know. Although I'm confident that this is trivial. I will definitely need serial communication as I am sending commands to the netduino over a serial COM port. I'm dedicating this entire controller to controlling and monitoring relays. All the digital pins, except the COM1 ports will be used to trip relays for lights, wall outlets, etc. The analog ports will be used for monitoring current on things like switches to report current draw (ie. >0A = on).
Are you intending to talk over the USB port or over the COM ports (D0/D1 and D2/D3)?
The USB port is currently only for debugging (and power). Secret Labs is looking into turning into a HID to be able send/receive data as well.
You can use either of the UARTs (D0/1 or D2/3) for standard serial communication to your computer through a serial cable or something like a XBee.
#4
Posted 03 September 2010 - 04:14 AM
The USB port is currently only for debugging (and power). Secret Labs is looking into turning into a HID to be able send/receive data as well.
Also, you can deploy/debug the Netduino using the D0/D1 ports and a USB-to-TTL cable--and then create code to use the USB client port however you'd like. USB is a bit advanced, so we're also working on some templates to do this. More on that later.
Chris
#5
Posted 03 September 2010 - 04:31 AM
#6
Posted 12 September 2010 - 07:05 PM
I have done some initial research on this and found the following links of interest.
USB Aware terminal emulator for testing.
Discussion on handling plug and unplug notifications from a windows application
Someone elses attempt at an example (example references two different namespaces with UsbClient)
Blog on using the microframework application via usb
ARM Disussion on a INF install file for a virtual comm port that works with recent windows versions
Discussions of using another USB class library that seems simular to the SPOT.USBClient
My testing idea is to have the test code first check if a pin had been grounded, before attempting to become a serial port client.
Is there any documentation of using a FTDI serial cable as the debugging interface, so that the USB port can become a virtual comm port under test?
Thanks
#7
Posted 12 September 2010 - 08:44 PM
Is there any documentation of using a FTDI serial cable as the debugging interface, so that the USB port can become a virtual comm port under test?
Hi freds, thanks for the post and welcome to the community.
If you have an FTDI RS232 cable, you can use an RS232 shield and erase/reflash your Netduino with the serial firmware. CuteDigi has an RS232 shield that we've used successfully in the lab.
You can also pick up a 3.3V USB-TTL serial cable and then you won't need any shield to convert the RS232 (-12V to 12V) voltages to TTL (0V to 5V) voltages....
Chris
#8
Posted 13 September 2010 - 02:10 AM
Hi ChrisHi freds, thanks for the post and welcome to the community.
If you have an FTDI RS232 cable, you can use an RS232 shield and erase/reflash your Netduino with the serial firmware. CuteDigi has an RS232 shield that we've used successfully in the lab.
You can also pick up a 3.3V USB-TTL serial cable and then you won't need any shield to convert the RS232 (-12V to 12V) voltages to TTL (0V to 5V) voltages....
Chris
Thanks for that info; in exploring the site today I found the info on how to load the firmware via USB.
Steps to restore an Erased Netduino
Where do I find the serial firmware?
Also do you have the same debug functionality in VS2010 via serial as USB?
I work a lot in the reprap.org environment with Sanguino boards so have the 5V TTL cable that’s used with a lot Arduino derivatives. Would it be compatible since the CPU is 5v tolerant?
In connecting the cable I should obviously match TX and RD(Com1?), what pin should I feed 5V power in VIN or 5V?
Very much looking forward to your new board with more pins and more analog.
Thanks for the welcome!
#9
Posted 13 September 2010 - 02:16 AM
Where do I find the serial firmware?
Also do you have the same debug functionality in VS2010 via serial as USB?
Here's a link to the current serial firmware:
http://forums.netdui...indpost__p__562
You have the same functionality via USB or serial. Most users will want to debug over USB and communicate with their PC via serial--but you can do it the other way if you turn the Netduino into a custom USB device. We'll be providing samples for that in the near future as well.
I work a lot in the reprap.org environment with Sanguino boards so have the 5V TTL cable that’s used with a lot Arduino derivatives. Would it be compatible since the CPU is 5v tolerant?
In connecting the cable I should obviously match TX and RD(Com1?), what pin should I feed 5V power in VIN or 5V?
You'll want a 3.3V TTL cable. The Netduino can take the 5V signals fine--but some 5V TTL cables won't be able to make sense of the 3.3V signals coming from the Netduino. You won't hurt the Netduino trying the 5V cable--but you'll probably need a 3.3V cable. Note that the 3.3V cable will actually work with at least some 5V devices as well.
If you have a true 5V regulated power feed, plug it into the 5V header. If you have unregulated power, plug 7.5V-12V into the Vin header.
We'll have a "more pins" solution for Netduino users in the near future as well. More to come...
Chris
#10
Posted 14 September 2010 - 03:35 AM
I successfully changed over to serial debugging/firmware using a 5V FDTI TTL cable that is used with lots of Ardunio clones.
I can also report that the serial debugging interface is much slower to use then the USB!!! But it does work as expected.
- Anshul likes this
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users