12f675_fuse_about_to_blow!


Closed Thread
Results 1 to 40 of 929

Hybrid View

  1. #1
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    WOOHOO!!!

    Now you getting it.
    Well another step forward for sure

    Good job!!!
    Cheers mackrackit.

    Dave

  2. #2
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    In Bruce's TX program under the section of Constants, he has PreAmble CON with a value of 15 HEX (I'm happy with that) Then he has Synch CON "~" = 7E HEX(I think) but how does "~" = anything if you see what I mean?

    Code:
    ' Constants
        PreAmble CON $A5    ' 10100101 preamble
        Synch    CON "~"    ' 01111110 synch byte
    Dave

  3. #3
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    In Bruce's TX program under the section of Constants, he has PreAmble CON with a value of 15 HEX (I'm happy with that) Then he has Synch CON "~" = 7E HEX(I think) but how does "~" = anything?

    Code:
    ' Constants
        PreAmble CON $A5    ' 10100101 preamble
        Synch    CON "~"    ' 01111110 synch byte
    *** Ah, I just figured it out 7E HEX is the ASCII value for the ~ symbol right?***

    So sending and receiving that symbol acts as a Synch BYTE is that right?

    Plus sorry I seem to have posted twice instead of editing.

    Dave

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


    Did you find this post helpful? Yes | No

    Default

    ""So sending and receiving that symbol acts as a Synch BYTE is that right?""
    Yup.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Cheers mackrackit.

    It's a funny game this programming, I've been scratching my head for ages trying to figure out how the Synch BYTE worked, then when the penny dropped it all seemed fairly obvious (it didn't until the penny dropped though). Still, another piece fits into the learning jigsaw I guess.

    Dave

  6. #6
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    I've been doing lots of reading and slowly trying to work my way through the TX / RX progs to get an understanding of what's actually happening, the sequence etc. One thing I can't see though is this.

    In the TX program we've got:

    Code:
    SEROUT2 D_OUT,BAUD,[PreAmble,Synch,DAT_OUT,DAT_OUT,CHK_SUM]
    And the RX has:

    Code:
    SERIN2 D_IN,N2400,[WAIT(Synch),DAT_IN1,DAT_IN2,CHK_SUM]
    So my Q is this: What's happened to the 'PreAmble BYTE' ?

    Code:
    PreAmble CON $A5    ' 10100101 preamble
    The Manual says:

    The list of data items to be received may be preceded by one or more qualifiers between parenthesis after WAIT. SERIN2 must receive these bytes in exact order before receiving the data items. If any byte received does not match the next byte in the qualifier sequence, the qualification process starts over
    So in this case that would be the Synch BYTE right? Synch BYTE always first (because of the WAIT command), the rest to follow. I can't see where / how the preAmble arrives though.

    Also this from WIKI:

    http://en.wikipedia.org/wiki/Syncword

    Suggest to me that a PreAmble and a Synch are two ways of doing the say thing, or very similar, have a got that on right?

    Dave
    Last edited by LEDave; - 8th November 2010 at 22:54.

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


    Did you find this post helpful? Yes | No

    Default

    The short answer about the pre-amble is it sets up the receiver hardware with data that is not noise so when the remainder of the data comes in, in our case the SYNCH, the SYNCH byte is easily detected from noise.... The receiver hardware acts on it but not the receiver code.
    SYNCH is for software
    PRE-AMBLE is for hardware
    Something like that.

    The long answer.
    http://davehouston.net/RFTipsTricks.htm
    Dave
    Always wear safety glasses while programming.

  8. #8
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit, thanks for the reply.

    I'll settle for the short answer right now (I'm off to bed in a mo) and read the long answer tomorrow.

    Dave

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