Re: [MyUSB Support List: 346] Re: about Serial over USB

2 views
Skip to first unread message

Jorge Pinto aka Casainho

unread,
Oct 28, 2008, 10:46:46 PM10/28/08
to myusb-sup...@googlegroups.com, Bicycle LED POV
Ter, 2008-10-28 às 16:25 -0700, abcmi...@gmail.com escreveu:
> With RS-232 you never have any guarantees about data being synched
> anyway, so USB doesn't really change that. The best way to synchronise
> USB data is to take the same approach as many of the standard classes
> - use a header with a "message ID" value. Upon connection the ID value
> is reset to 0, and is incremented each time a new message is sent. By
> having both the original message and the response share the same
> value, you can ensure that data is always in synch.

Thanks!! :-)


> Also, assuming your device does not respond until the memory has been
> written, I don't see any synch issues. Data in -> Device Wait While
> Programming -> Data out, repeat.

Ok, I will do like this :-) Thanks.


>
> - Dean
>
> On Oct 29, 8:45 am, "Sean D'Epagnier" <geckosena...@gmail.com> wrote:
> > It is funny how bluetooth supports both syncronous and asynchronous
> > serial transfer.
> >
> > On 10/28/08, Jorge Pinto aka Casainho <casai...@gmail.com> wrote:
> >
> >
> >
> > > Thank you :-)
> >
> > > So, thinking as RS232 being a asynchronous protocol, when using it over
> > > USB it is not asynchronous, right? -- I need to received data from PC
> > > and write it on a DataFlash memory, it's important to know that
> > > AT90USB162 MCU can lost syncronization over data comming from
> > > USBtoSerial because of possible delay to writing it on memory.
> >
> > > :-)
> >
> > > Seg, 2008-10-27 às 23:35 -0700, abcminiu...@gmail.com escreveu:
> > >> Hi Casainho,
> >
> > >> The host will buffer packets for transmission to the device, while the
> > >> device sends NAK responses to the host on the data out endpoint. This
> > >> is similar to the way that the MyUSB demos wait for the host by
> > >> spinlooping on Endpoint_ReadWriteAllowed(), ensuring that packets are
> > >> only sent when the receiver is ready to accept them.
> >
> > >> USB bulk endpoints are not designed for exact timing anyway, thus
> > >> buffering will skew the transmission time if the packets are delayed,
> > >> but will at least ensure that data sent is received.
> >
> > >> - Dean
> >
> > >> On Oct 28, 12:39 am, Casainho <casai...@gmail.com> wrote:
> > >> > Hello :-)
> >
> > >> > On *Bicycle LED POV, we are working on an API, protocol, over
> > >> > USBtoRS232. Since Serial is an asynchronous communication, what
> > >> > happens if on PC we send a stream of bytes and hardware, the MCU,
> > >> > can't handle it? like writing that stream to a low speed memory? -
> > >> > bytes over Serial are lost? Where? on USB?
> >
> > >> > Thank you.
> >
> > >> > *http://code.google.com/p/bicycleledpov
> >

Reply all
Reply to author
Forward
0 new messages