SERIN2 – SEROUT2 and Manchester mistake.


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Location
    North of France
    Posts
    18

    Default

    Thanx mackrackit i know what you say but my problem is not here because, if i don't use the Manchester Encoding/Decoding, it work like a charm, event at 9.6Kbps (i'm glad to saw that).

    When i transmit in "clear mode" everything is good.

    My error is here :

    SERIN2 RECEPTION, 16468, [ManchesterWord]

    Because ManchesterWord is double sized than normal byte.
    I've tried with SERIN2 RECEPTION, 16468, [STR...

    but it's impossible because ManchesterWord is "VAR WORD".

    Because i'm just beginner with serin / serout, i don't know all the tips and there is probably one wich can do the rest.

    (and sorry for my bad English language, mine is French)
    Lyd.

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

    Default

    This is my best guess, but I am not sure as I do not see anything else.

    Where you have IBIN16 , try not using the I. This adds an extra character to the 16 digit string. Worth a quick try?
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429

    Default

    This should do it:

    SERIN2 RECEPTION, 16468, [ManchesterWord.Byte0,ManchesterWord.Byte1]
    Last edited by Kamikaze47; - 4th September 2007 at 16:51.

  4. #4
    Join Date
    Jan 2006
    Location
    North of France
    Posts
    18

    Default

    Quote Originally Posted by Kamikaze47 View Post
    This should do it:

    SERIN2 RECEPTION, 16468, [ManchesterWord.Byte0,ManchesterWord.Byte1]
    Yes, it' s the same code as bruce just posted too.
    I just need to modify my serout on TXPIC too.

    Nice to saw all your replies.

    Lyd.

  5. #5
    Join Date
    Jul 2003
    Posts
    2,405

    Default

    IBIN16 is sending % followed by 16 bytes of data. Not just 16-bits. This produces an
    ASCII 0 or 1 for each bit in the word.

    Try something like;
    Code:
    serout2 TRANSMISSION,16468,[$55,$55,$55,$aa,Manchesterword.LowByte,Manchesterword.HighByte]
    On the receiving end, try something like;
    Code:
    SERIN2 RECEPTION, 16468, [WAIT($aa),ManchesterWord.LowByte,ManchesterWord.HighByte]
    This way SERIN2 on the receiving end simply ignores your $55 and waits for $aa before the
    16-bit data packet.
    Last edited by Bruce; - 4th September 2007 at 16:50.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  6. #6
    Join Date
    Jan 2006
    Location
    North of France
    Posts
    18

    Default

    Quote Originally Posted by Bruce View Post
    IBIN16 is sending % followed by 16 bytes of data. Not just 16-bits. This produces an
    ASCII 0 or 1 for each bit in the word.

    Try something like .../...
    Well, it's fantastic, you just turned my simple remote to remote-control ;O)

    Yes, your solution works fine.

    Many thanx all for your fast replies.

    Lyd.

  7. #7
    Join Date
    Jan 2006
    Location
    North of France
    Posts
    18

    Default

    Well i've just done a test :

    This is what i send: 0110100101100101
    This is what i get on the RXPIC input pin named RECEPTION and connected to the RF 433Mhz circuit: 0110100101100101

    You can see it's the same datas.

    Now, if i do
    SERIN2 RECEPTION, 16468, [ManchesterWord]
    SEROUT2 INFO, 16468, [BIN16 ManchesterWord,13,10]

    This is what i get on the RXPIC pin named INFO : 0000000000100101

    So my error is a pure coding mistake, not RF.

    Thanx for you help.

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55

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