For wire communication, you can use a very simple protocol. I would
start with a framing character that will never appear in the data
(such as 0xff). I would send the data in ASCII, probably comma or tab
delimited. That makes it really easy to process at the PC end. Then
terminate with a second framing character (maybe 0xfe). With wire, you
may not need a checksum or CRC but it might not hurt, especially a
simple checksum. Then, you would need a special "message" for the PC
to request a repeat. I would use an ACII character not in the data
stream, say "R" for repeat.
That is about it.
There really are no standard protocols for this type of thing because
it is so simple.
Jim Wagner
Oregon Research Electronics
On Jun 14, 2009, at 8:43 PM, Brian wrote:
>
>
> I am working on a temp datalogger. I am using a mega16 using
> CodeVision and Visual Basic 2008. So far all is working.
>
> Does anyone know of a tutorial or book that would show/teach me
> communication protocols using the USART? I know there are other
> forms of comms but I am wanting to use the USART. I can do this by
> sending a byte to the micro and what that value is the micro would
> jump to a subroutine, but if there is a better way I don't want to
> reinvent the wheel.
>
> I have searched this site, the net and AVR Freaks but there is so
> much information and so many variations it takes a long time to go
> through. I figured this would be more direct.
>
> Brian
>
>
>
[Non-text portions of this message have been removed]