Help with Manchester Encoding


Results 1 to 9 of 9

Threaded View

  1. #1
    Join Date
    Dec 2007
    Posts
    34

    Default Help with Manchester Encoding

    Hello All,
    A while ago I found a code posted by dhouston for Manchester encoded RF communication. http://www.picbasic.co.uk/forum/showthread.php?t=6261
    I have been trying to compile the code using Microcode Studio and the PBP compiler but have come across some problems.

    The first problem I came across was the PIC fuse settings, the code would not compile when the “@ __config” line was present. I did some searching and found that when using Microcode Studio with PBP, the fuse settings needed to be written differently;

    It is written like this in dhouston’s examples (MPASM);
    <code>@ __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON & _CP_OFF & _CPD_OFF</code>

    Converted fuse settings, thanks to Melanie’s Post(PM);
    <code>@ DEVICE PIC12f629, INTRC_OSC_NOCLKOUT
    @ DEVICE PIC12f629, WDT_OFF
    @ DEVICE PIC12f629, PWRT_ON
    @ DEVICE PIC12f629, MCLR_OFF
    @ DEVICE PIC12f629, BOD_ON
    @ DEVICE PIC12f629, CPD_OFF</code>

    I made the changes and removed “CP_OFF” from the code because I don’t think the 12F629 supports that setting. The Transmitter code then compiled successfully with no errors.

    Unfortunately the Receiver code did not compile successfully, it produces the same three errors for both line 41 and 42.

    Line 41: <code>If RF[0]+RF[1]<>&HFF Then init</code>
    Line 42: <code>If RF[2]+RF[3]<>&HFF Then init</code>

    Errors produced by Microcode Studio whilst compiling;
    ERROR Line 41: Bad expression. (RX.pbp)
    ERROR Line 41: Bad expression or missing THEN. (RX.pbp)
    ERROR Line 41: IF without a matching ENDIF. (RX.pbp)
    ERROR Line 42: Bad expression. (RX.pbp)
    ERROR Line 42: Bad expression or missing THEN. (RX.pbp)
    ERROR Line 42: IF without a matching ENDIF. (RX.pbp)

    Can anyone see any problems with the code that could cause such an error? I have attached copies of the full code just in case.

    Thank you all for your help,
    Jeremy
    Attached Files Attached Files
    Last edited by jhorsburgh; - 11th August 2008 at 12:51. Reason: Spelling

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  2. SERIN2 – SEROUT2 and Manchester mistake.
    By RCtech in forum Serial
    Replies: 8
    Last Post: - 4th September 2007, 22:55
  3. Help with serin, serout, Manchester encoding
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 5th April 2007, 13:31
  4. Manchester encoding
    By jonathanRF in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th February 2007, 19:05
  5. Manchester encoding
    By jonathanRF in forum Off Topic
    Replies: 3
    Last Post: - 8th February 2007, 18:56

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