2008/12/13, Sebastien Lelong <[email protected]>:
> Hi guys,
>
> (PIC to PIC com. is not the purpose, though it might work... Isn't i2c a
> better solution ?).
Could be... But don't limit the *message definition* that pic-pic
comms is not possible unless you have a good reason. One day, someone
will want to use it for pic-pic comms and then he should be able to
create/adapt the code.

> About the length, even if configurable, I prefer using SOF/EOF since you
> can't know sometime how big the frame will be.
You don't have to handle frame lenght with a field (although it has
advantages to know it from the start). The main issue is you must be
able to receive a frame, store it in memory and check if it is okay
without understanding the content.

> It could also be longer than
> 256. For instance, I used to record sounds with my PIC and send the wave to
> the PC...
Maybe the protocol should. If you want a clean and simple interface to
you lib, you will have to pass the full message. So messages in a pic
are limited in size...


> About checksum: if checksum is wrong, this means some bad things occured
> during the com. So I also need some kind of "Repeat Request" message. I'd
> also need a ACK mecanism, with timeout: no ACK received for X msecs ?
> Re-send the message.
That's the level above 'framing' and it depends on your application if
you want this. If you want to emulate a stream (e.g. transer a file)
this is mandatory. In controll applications, you might send a control
command every 100ms. If one gets damaged, it is important you don't
try to process it. But there is no reason to repeat it, just wait for
the next one.


> For now, I need to implement the Escape char: used to transmit a char which
> is reserved (mainly the EOF, so not detected as a real end of frame).
The SOF is also important. If you receive this token, the receiving
state is reset, expecting a new frame.

Joep

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to