1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Books on how to implement ASCII command protocol for uC using sequence numbers and XOR error correct

Discussion in 'Embedded' started by attoampere, Apr 28, 2012.

  1. attoampere

    attoampere Guest

    i come accross a half duplex ASCII protocol that uses following messag
    format again and again: [STX][dev.addr.][sequenc
    number][message/commands...][ETX][checksum]

    not only in industrial rs485 devices, but also in this consumer device
    www.kaleidescape.com/go/control-protocol

    so if this protocol is so widely adopted, why can't i find information
    about it.. what is it called? how does one implement such a protocol...

    i wanna use this kind of protocol with my own uC projects...

    i definitely like it's conceptual simplicity, compared to othe
    protocols..

    i like this Sequence Number/Repeat Flag thing...

    The sequence number is a single byte that conveys both a sequence numbe
    (legal values: 0 to 7) and a bit-flag indicating that the command block i
    being repeated due to a communications breakdown. The sequence number i
    used as an identity stamp for each command block

    this question is the only valuable information i could find... How do yo
    design a serial command protocol for an embedded system?

    is there a book about the design and implemention of ASCII protocols for u
    use?
     
    attoampere, Apr 28, 2012
    #1
    1. Advertisements

  2. attoampere

    linnix Guest

    It's called ASCII.
    You enclose fixed length message blocks with Start of Text (STX) and
    End of Text (ETX) and checksum it to avoid collisions. I've use it
    with multi-drop single wire serial long time ago. Might use it again.
    Just do it. No license fee needed.
     
    linnix, Apr 30, 2012
    #2
    1. Advertisements

  3. attoampere

    upsidedown Guest

    There are hundreds (if not thousand) protocols with
    STXxxxxxxETXbcc/crc syntax.

    Without further information, it is hard to tell which one is used. If
    this syntax is used for binary protocols, typically some DLL xxx
    sequences are used to escape some protocol characters.
     
    upsidedown, May 1, 2012
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.