Ethernet or RS232 Communication w/ Propeller
QuadrtrFlyr
Posts: 73
Hello folks,
I am currently working on a big project and am trying to decide what communication protocol I am going to use with my Propeller and a PC. My setup is as follows: A Parallax Propeller chip is going to be hooked up to the PC via either Ethernet or RS232, and it will be sending information such as flight angles and GPS coordinates to MATLAB which quickly processes the data and via my control algorithms and outputs an optimal force vector which is then transmitted to the Propeller which sends PWM signals to motors. This is all going to be done in real time so I want optimal performance.
Using FullDuplexSerial I can communicate with MATLAB via RS232 and depending on my settings (baud rates,etc) I believe I can send and receive all of these sensor/force data packets pretty fast. However I also have the option to send/receive data via Ethernet and was wondering if there are any advantages to doing this if that is even possible with the propeller. Maybe I am making things to complex, but was just curious to know if RS232 was accurate enough for my application. I would be using a 15pin RS232 cable, not to sure of the wiring just yet.
Also does anyone have any good links to the following topic: Introduction to Serial Communication with basic TX/RX for micro-controllers/PC - how protocol works, when to send, when to receive, etc/
Best,
Robert
I am currently working on a big project and am trying to decide what communication protocol I am going to use with my Propeller and a PC. My setup is as follows: A Parallax Propeller chip is going to be hooked up to the PC via either Ethernet or RS232, and it will be sending information such as flight angles and GPS coordinates to MATLAB which quickly processes the data and via my control algorithms and outputs an optimal force vector which is then transmitted to the Propeller which sends PWM signals to motors. This is all going to be done in real time so I want optimal performance.
Using FullDuplexSerial I can communicate with MATLAB via RS232 and depending on my settings (baud rates,etc) I believe I can send and receive all of these sensor/force data packets pretty fast. However I also have the option to send/receive data via Ethernet and was wondering if there are any advantages to doing this if that is even possible with the propeller. Maybe I am making things to complex, but was just curious to know if RS232 was accurate enough for my application. I would be using a 15pin RS232 cable, not to sure of the wiring just yet.
Also does anyone have any good links to the following topic: Introduction to Serial Communication with basic TX/RX for micro-controllers/PC - how protocol works, when to send, when to receive, etc/
Best,
Robert
Comments
If you focus on leading edge devices like FT2232H, that uses 480Mbd USB and can send 12MBd UART speeds, or it has a Async FIFO mode that will cost more Prop pins, but go faster still. ( 25MBytes/sec ?)
MATLAB is likely to be the weak-link, so some PC loop-back tests with a FT2232H should give you some numbers.
Added : I found an example of a FT232H + FPGA, which will use one of the parallel modes, and that claims 60MB/s (may be a little 'rounded up' as there is some USB overhead)
http://www.lab-tools.com/instrumentation/soft-firm-hard-ware/FPGA_interface_to_PC/help.html
Ethernet is fine. You'll need some kind of interface. You could use a Spinneret or use the Spinneret as a model design for a wired Ethernet interface. For a wireless Internet connection, you're best to start with a commercial device like Roving Networks' WiFi adapters. These can connect to a WiFi access point and establish a Telnet link to another microcontroller or computer. Telnet looks to the clients on each end just like a wired bidirectional serial port. If you use a wired Ethernet connection, you'd also use Telnet as the protocol. Look at the Wikipedia article on this as well.
Best,
Robert