|
Firmware communication protocol : Streaming vs Packets February 04, 2010 11:20AM |
Registered: 16 years ago Posts: 278 |
|
Re: Firmware communication protocol : Streaming vs Packets February 04, 2010 04:44PM |
Registered: 18 years ago Posts: 900 |
|
Re: Firmware communication protocol : Streaming vs Packets February 04, 2010 04:55PM |
Registered: 17 years ago Posts: 132 |
|
Re: Firmware communication protocol : Streaming vs Packets February 04, 2010 05:21PM |
Registered: 16 years ago Posts: 278 |

|
Re: Firmware communication protocol : Streaming vs Packets February 04, 2010 05:41PM |
Registered: 16 years ago Posts: 278 |
Sorry about that. The system I'm working on implements following spline curves on the firmware. My firmware will be GCode illiterate because it is too computational expensive to turn lines into a two linkage polar arm form. I've got the cubic spline math working at ~15 microseconds per spline step on an arduino mega; To drive a 5D robot, I'll need 5 splines per path descriptor (less than .1 milliseconds for spline stepping.) I believe doing it this way greatly simplifies how the firmware operates, reducing all motion to a 5 dimentional spline curve (2 polar arms, 1 linear arm, the extrusion 'position', and the temperature); my accuracy for transforming linear to polar depends completely on my bandwidth, and the fixed point accuracy for which I've coded the firmware; it is currently a 16 bit integer + 32 bit binary fraction (over 2^32), with ranges limiting some of the components (160 bits total for spine step state -- each step requires 16 single byte ADD or ADC operations on the data structure). Sorry if that is a bit complex, but I have difficultly describing it in words. The code will probably be shorter than the paragraph I wrote. 
|
Re: Firmware communication protocol : Streaming vs Packets February 04, 2010 06:09PM |
Registered: 18 years ago Posts: 1,094 |


|
Re: Firmware communication protocol : Streaming vs Packets February 04, 2010 06:58PM |
Registered: 18 years ago Posts: 900 |

|
Re: Firmware communication protocol : Streaming vs Packets February 04, 2010 07:00PM |
Registered: 16 years ago Posts: 278 |

|
Re: Firmware communication protocol : Streaming vs Packets February 04, 2010 07:05PM |
Registered: 18 years ago Posts: 900 |
|
Re: Firmware communication protocol : Streaming vs Packets February 04, 2010 08:09PM |
Registered: 17 years ago Posts: 132 |
Quote
BeagleFury Wrote:
> You mentioned that echo verification would
> probably be an effective solution. What technique
> would be used to send data from firmware to host
> without confusing the echo verification? Some
> form of handshake that lets the firmware respond
> with anything it might have, where the host echos
> it back to firmware to guarantee delivery or
> something like that? Do you have any good
> illustrative examples to make sense of what you
> might propose?
>
|
Re: Firmware communication protocol : Streaming vs Packets February 04, 2010 08:35PM |
Registered: 18 years ago Posts: 900 |
|
Re: Firmware communication protocol : Streaming vs Packets February 04, 2010 09:35PM |
Registered: 16 years ago Posts: 278 |

|
Re: Firmware communication protocol : Streaming vs Packets February 04, 2010 11:38PM |
Registered: 18 years ago Posts: 1,094 |

|
Re: Firmware communication protocol : Streaming vs Packets February 04, 2010 11:41PM |
Registered: 17 years ago Posts: 132 |
Quote
BeagleFury Wrote:
Anyway, having thought about this a bit more, I don't believe any kind of echo "error detection" will work properly. Figuring out retransmition and recovery becomes significantly more difficult when the host sends 10 commands as 400-500 bytes get buffered in the bowels of USB drivers and OS streams. If the firmware fails to correctly recieve the first command, all the remaining commands become ticking time bombs if the firmware tries to execute them as if nothing was wrong.
|
Re: Firmware communication protocol : Streaming vs Packets February 05, 2010 01:43AM |
Registered: 16 years ago Posts: 278 |
) The three crc character codes must be printable ascii characters per my requirements to dump / monitor on screen. 16 bit codes require at least 3 8 bit characters. I only introduce control characters to avoid having to introduce escaping logic for framing signals.|
Re: Firmware communication protocol : Streaming vs Packets February 05, 2010 01:50AM |
Registered: 16 years ago Posts: 94 |
Quote
BeagleFury
My test programs have nothing in them except the comms test. The *only* point of failure is the standard Arduino implementation of the Serial class. There is no heavy maths. No expensive loops. Nothing except a very tight loop checking for serial availability, a buffer save, and an echo back upon reciept. There is the possibility that the transmittion of data from the motherboard to host disables interrupts, and that could be where the data loss happens; which may imply that we effectively do not have bidirectional UART comms, but a crippled bidirectional / mostly unidirectional comms channel.
|
Re: Firmware communication protocol : Streaming vs Packets February 05, 2010 05:02AM |
Registered: 18 years ago Posts: 900 |
|
Re: Firmware communication protocol : Streaming vs Packets February 05, 2010 06:08AM |
Registered: 18 years ago Posts: 900 |
|
Re: Firmware communication protocol : Streaming vs Packets February 05, 2010 06:40AM |
Registered: 18 years ago Posts: 900 |
|
Re: Firmware communication protocol : Streaming vs Packets February 05, 2010 09:20AM |
Registered: 16 years ago Posts: 278 |
|
Re: Firmware communication protocol : Streaming vs Packets February 05, 2010 09:22AM |
Registered: 16 years ago Posts: 278 |
|
Re: Firmware communication protocol : Streaming vs Packets February 05, 2010 11:19AM |
Admin Registered: 19 years ago Posts: 7,883 |
|
Re: Firmware communication protocol : Streaming vs Packets February 05, 2010 12:43PM |
Registered: 16 years ago Posts: 278 |
|
Re: Firmware communication protocol : Streaming vs Packets February 05, 2010 03:59PM |
Registered: 18 years ago Posts: 900 |
|
Re: Firmware communication protocol : Streaming vs Packets February 05, 2010 04:03PM |
Registered: 17 years ago Posts: 132 |
|
Re: Firmware communication protocol : Streaming vs Packets February 05, 2010 04:43PM |
Registered: 18 years ago Posts: 1,094 |
|
Re: Firmware communication protocol : Streaming vs Packets February 05, 2010 08:33PM |
Registered: 18 years ago Posts: 900 |
|
Re: Firmware communication protocol : Streaming vs Packets February 06, 2010 01:07AM |
Registered: 16 years ago Posts: 278 |
I even added a back space, and a reprint line command (CTRL-E). Could add fancy edit controls pretty easily, just need to define the behavior. To switch back to crc/window mode, CTRL-A three times does the trick, and it responds with a NAK framing error to let you know where to start sending packets in the sliding window. By default, it starts out in packet mode, but it might make more sense to start it out in interactive (a host can simply transmit 3 SOH (CTRL-A) characters, grab the current window frame, and start transmitting packets.)|
Re: Firmware communication protocol : Streaming vs Packets February 06, 2010 06:15AM |
Registered: 18 years ago Posts: 900 |
|
Re: Firmware communication protocol : Streaming vs Packets February 18, 2010 06:18AM |
Registered: 16 years ago Posts: 45 |
