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


Closed Thread
Results 1 to 14 of 14
  1. #1
    Join Date
    Sep 2006
    Location
    Indiana, USA
    Posts
    72

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

    Any one know of any posts regarding the decoding of S.A.M.E. messages? or if you can help more in depth please let me know.
    I guess posts on FSK or AFSK would be helpful as well.
    I figure i'll need a f-V converter and to use an analog input. Any tips on how to massage the data once its in the PIC?
    I looked for some posts and didn't come up with much.

    Anyway

    Thanks ahead of time!

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Last edited by Archangel; - 29th November 2008 at 19:57.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

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


    Did you find this post helpful? Yes | No

    Default Thanks Joe.

    I kind of already know that much info, its just the baud rate stuff and other things that are making my head hurt. 520.83 BAUD and no Stop bit seems to rule out using serin or hserin, correct me if im wrong and make fun of me if you wish. I was simply going to handle the 2083.3 HZ Mark tone 1562.5Hz Space tones with a couple of 567 tone decoders and a comparator. That would at least get me some TTL 1's and 0's to work with. But im lost on how to handle the data as far as timing goes. If it were 9600 8n1 i'd have no trouble decoding it.
    Any idea's?

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


    Did you find this post helpful? Yes | No

    Default

    I think in this case
    baud would equal bps.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ryan7777 View Post
    . . . and make fun of me if you wish . . . .
    Oh hell no, 1st off not my style, second off, you're probably better at this than I am.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  6. #6
    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!

  7. #7
    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.

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


    Did you find this post helpful? Yes | No

    Default Yeah after I "RTFM" , I realized serial may support non-standard modes

    Though the magic green book didn’t seem to say much on how to get from true mode to inverted with its (1000000 / baud) – 20 equation, like how to get the extra bits in there? Anyway, the 8N0 thing is really what bothers me, does it even need a stop bit? If it does I do know that each bit is supposed to be 1.92mS wide but don’t really know what I’d do there, I figure it would have to be something external to the PIC or at least the HSERIN command. I realized that shiftin’s clock pin is an output, and I’d need it to be a clock in to be useful. It looks like a USART will work with Slave mode as long as it will let me do the odd baud and I can figure out a way around no stop bit..

  9. #9
    fronkensteen's Avatar
    fronkensteen Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ryan7777 View Post
    Though the magic green book didn’t seem to say much on how to get from true mode to inverted with its (1000000 / baud) – 20 equation, like how to get the extra bits in there?
    It sure does!!!
    Look for the phrase "Bit 14 selects inverted or true level"

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


    Did you find this post helpful? Yes | No

    Default ?

    So where does bit 14 fit into 1000000? or are we looking at the last 7 bits of 14? and please SOMEONE who can offer some "on the topic" advice chime in?

  11. #11
    fronkensteen's Avatar
    fronkensteen Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ryan7777 View Post
    So where does bit 14 fit into 1000000? or are we looking at the last 7 bits of 14? and please SOMEONE who can offer some "on the topic" advice chime in?
    You're right. I don't have a clue. Or do I?
    Was I 'On Topic' or not?
    You be the judge...

    From the book-
    Mode is used to specify the baud rate and operating parameters of the
    serial transfer. The low order 13 bits select the baud rate. Bit 13 selects
    parity or no parity. Bit 14 selects inverted or true level. Bit 15 is not
    used.
    The baud rate bits specify the bit time in microseconds - 20. To find the
    value for a given baud rate, use the equation:
    (1000000 / baud) - 20
    See those references to Bit 13, Bit 14, Bit 15?
    Do you still think that the MODE parameter used with SERIN2/SEROUT2 is limited to 8 bits?

    So, if you want this 520.83 baud (1,000,000 / baud = 1920.x) - 20 = 1900 = %0000 0111 0110 1100, to work with 'true levels', you have the number already. If you want it to work with 'inverted levels', you set bit 14, just like the book says. %0000 0111 0110 1100 becomes % 0100 0111 0110 1100.

    Sorry. Am I still 'Off-Topic'?

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ryan7777 View Post
    So where does bit 14 fit into 1000000?
    It does not. 1000000 is only 7 bits long
    please SOMEONE who can offer some "on the topic" advice chime in?
    I thought the Brain guy was on topic. You asked a question and you were told where to find the answer.

    Maybe this will help
    http://www.picbasic.co.uk/forum/show...4&postcount=10

    At this point I would say to hook it up and play with it.
    Dave
    Always wear safety glasses while programming.

  13. #13


    Did you find this post helpful? Yes | No

    Default

    Because I am totally clueless on this, I had to ask. Is this the audio stuff they when broadcast when testing the alert system on TV?
    Tim Barr

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


    Did you find this post helpful? Yes | No

    Default

    There is digital stuff along with the transmission.
    http://www.weather.gov/nwr/same.htm
    Tells a little about it.
    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, 07:50
  2. Message String Table using Readcode
    By mytekcontrols in forum Code Examples
    Replies: 2
    Last Post: - 10th July 2005, 23:17

Members who have read this thread : 1

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