+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2007
    Posts
    42

    Default Manchester coding question

    I have been using manchester coding, $55 as the preamble and $aa as the leader bit for PIC to PIC RF transmission and everything is working. I would like to know the technical reason why I am using manchester coding and $55 as the preamble.

  2. #2
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216

    Default

    This thread has some pretty good information in it.
    http://www.picbasic.co.uk/forum/showthread.php?t=4285
    Wisdom is knowing what path to take next... Integrity is taking it.
    Ryan Miller

  3. #3
    Join Date
    Mar 2007
    Posts
    42

    Default

    I just want to confirm my code, am I using the GE Thomas Convention where "1" is "10" or am I using the IEEE convention where "1" is "01" because it seems like I'm encoding it the IEEE convention way but at serout I invert it so it becomes the GE Thomas Convention.

    Include "Modedefs.bas"
    main:
    u var byte : counter var byte : encode var byte : u = %1101

    'Manchester encoding
    For counter = 0 to 3
    If u.0[counter]=0 Then
    encode.0[counter*2]=0 : encode.0[counter*2+1]=1 'If it is a zero make the first bit 0 and second bit 1
    Else
    encode.0[counter*2]=1 : encode.0[counter*2+1]=0 'If not then make first bit 1 and second bit 0
    EndIf
    Next counter
    serout PORTB.0, n2400, [ $55 , $55 ,$55, $55, $aa , encode ] '
    goto main

  4. #4
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216

    Default

    uggg.... you're making my brain hurt! Just kidding!
    I can see why you would want clarification for documentation. The way it is coded appears to be the GE method. Physically, if I remember correctly, since it in inverted it idles high. So electrically I think it becomes the other method. Maybe I'm way off here..... gonna need some verification from someone smarter than me.
    Wisdom is knowing what path to take next... Integrity is taking it.
    Ryan Miller

  5. #5
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by oneohthree View Post
    I just want to confirm my code, am I using the GE Thomas Convention where "1" is "10" or am I using the IEEE convention where "1" is "01" because it seems like I'm encoding it the IEEE convention way but at serout I invert it so it becomes the GE Thomas Convention.
    I wouldn't think it would matter a whole lot as long as you're using the same thing at both ends. And if the TX and RX like one combo better than the other, well, there ya go... Can't really say for sure, I haven't tried both ways.

  6. #6
    Join Date
    Mar 2007
    Posts
    42

    Default

    I know that it is working and that it doesn't really matter but I want to check my oscilloscope readings correspond with the correct convention.

  7. #7
    Join Date
    Jul 2003
    Location
    USA - Arizona
    Posts
    156

    Default

    I would like to know the technical reason why I am using manchester coding and $55 as the preamble.
    Well, this is sure a strange question. I would think you would know why you are using it, since you have it in your code. I think the link rhino provided is good. But if you absolutley must know and have no clue why it is in your code, I would look at http://www.ottawarobotics.org/articles/rf/rf.html.

    I know that it is working and that it doesn't really matter but I want to check my oscilloscope readings correspond with the correct convention.
    Another strange one, how about using MPLAB (or the simulator of your choice) and see how the code runs. Then, compare this to what you see in the oscilloscope and see what happens. They should match, and you should be able to tell how the bits are done and how the code treats them.

    I agree with skimask, I do not think it matters (as long as it is the same in both TX and RX).

  8. #8
    Join Date
    Jun 2006
    Posts
    40

    Default

    Just wonder, when we use manchester code ?
    :-P

  9. #9
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    2,914

    Default Oh, Lord...

    Have you read any of the above replies?

    Have you visited the links?

    If you did and did not understood anything, come back to ask. The link http://www.ottawarobotics.org/articles/rf/rf.html at the 2.1 MANCHESTER ENCODING - The art of balancing a serial stream discusses a lot...

    Ioannis

  10. #10
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    2,914

    Default Oh, Lord...

    Have you read any of the above replies?

    Have you visited the links?

    If you did and did not understood anything, come back to ask. The link http://www.ottawarobotics.org/articles/rf/rf.html at the 2.1 MANCHESTER ENCODING - The art of balancing a serial stream discusses a lot...

    Ioannis

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  2. Manchester Coding / Decodeing for RF Modules
    By charudatt in forum Code Examples
    Replies: 23
    Last Post: - 31st January 2009, 10:51
  3. Replies: 8
    Last Post: - 22nd July 2008, 20:31
  4. 433MHz RF PIC2PIC connection
    By NavMicroSystems in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 5th February 2006, 15:44
  5. Manchester coding
    By micro in forum General
    Replies: 1
    Last Post: - 13th January 2006, 03:40

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