Specific Area Message Encoding (S.A.M.E.)


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Location
    Indiana, USA
    Posts
    72


    Did you find this post helpful? Yes | No

    Default I was just teasing ya!

    But some people round here can't seem to help themselves when it comes to a little slap over the head. I don't mind, sometimes I need it. I think I'll let this post lay for a while and see if anyone has any advice. But I'm thinking SHIFTIN might work, then i'll have to figure out a way to clock in and count the number of incoming bits or bytes. The preamble alone is 16 bytes of $AB repeating. Then the message itself, which is what i want to decode, can be up to 268 bytes long. but it is supposed to always start with ASCII ZCZC to let you know the message is starting, then wait for "NNNN" which is the end of the message. Everything is delimited with a "dash", so it shouldn't be so hard to break the message down. I've never worked with SHIFTIN before, and know nothing of interupts, so if anyone has any advice or a better way, let me know!

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    It most times gets me in trouble... but I have been thinking.

    8N0 sounds like synchronous, so would a PIC with USART work?
    Mister E's multicalc give this for 520.83 baud.
    Code:
    DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 20h ' Enable transmit, BRGH = 0
    DEFINE HSER_SPBRG 255 ' 520.83 Baud @ 20MHz, 134.43%
    DEFINE HSER_CLROERR 1 ' Clear overflow automatically
    And...being 1 STOP bit is a signal going from low to high, and the last bit of SAME is always 0
    would that look like a STOP bit?

    If I did my math correctly...
    SERIN2 MODES
    520.83 baud in TRUE mode is
    1900
    520.83 baud in INVERTED mode is
    5996

    Maybe someone with a BRAIN will correct me
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Embedded Strings in your Code Space
    By mytekcontrols in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 9th March 2008, 08:50
  2. Message String Table using Readcode
    By mytekcontrols in forum Code Examples
    Replies: 2
    Last Post: - 11th July 2005, 00:17

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts