compilation error


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Jan 2012
    Posts
    12

    Default compilation error

    Hallo everyone,

    I just copied this code from Rentron electronics and tried to compile it to get a hex code to programme the pic16f628, but unfortunately I get an error and I can't seem to get the hex code.

    I use Nigel Goodwin's WinPicProg, and whenever I try to set the fuses there I also get a verification error. Even when I disable the auto verify I can't get the hex code.

    Here is the first part of the code causing the error:
    @ DEVICE MCLR_OFF, INTRC_OSC, WDT_OFF, LVP_OFF, BOD_OFF, PWRT_ON, PROTECT_OFF

    Illegal Opcode (MCLR_OFF)

    the complete code is here:

    http://www.rentron.com/PicBasic/IR_Chips.htm

    I appreciate your help!

    Many thanks in advance.

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


    Did you find this post helpful? Yes | No

    Default Re: compilation error

    Why are you using that?
    Use MicroCode Studio that comes with PicBasicPro to edit the code and to invoke PicBasic to compile it.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Jan 2012
    Posts
    12


    Did you find this post helpful? Yes | No

    Default Re: compilation error

    Quote Originally Posted by mackrackit View Post
    Why are you using that?
    Use MicroCode Studio that comes with PicBasicPro to edit the code and to invoke PicBasic to compile it.
    Thanks for the instant reply,

    But this is how I had learned to do the job for some time in the past before I started some C ...etc.

    please see attachment
    Attached Images Attached Images  

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


    Did you find this post helpful? Yes | No

    Default Re: compilation error

    For the 628A...
    @ DEVICE MCLRE_OFF, INTRC_OSC, WDT_OFF, LVP_OFF, BOD_OFF, PWRT_ON, PROTECT_OFF
    And the config type you are using is for PM. Is that set correctly in MCS?
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,598


    Did you find this post helpful? Yes | No

    Default Re: compilation error

    Check the code here:
    http://www.picbasic.co.uk/forum/showthread.php?t=15960

    You are missing the PIC model after DEVICE.

    Robert

  6. #6
    Join Date
    Jan 2012
    Posts
    12


    Did you find this post helpful? Yes | No

    Default Re: compilation error

    Quote Originally Posted by Demon View Post
    Check the code here:
    http://www.picbasic.co.uk/forum/showthread.php?t=15960

    You are missing the PIC model after DEVICE.

    Robert
    Thanks for the reply,

    And by the way interesting tutorial for me for further and later needs.

    But as for now I need this job urgently done for this IR project and I can't seem to get anywhere except with illegal opcode and found label after column 1 (DEVICE).

  7. #7
    Join Date
    Jan 2012
    Posts
    12


    Did you find this post helpful? Yes | No

    Default Re: compilation error

    Quote Originally Posted by mackrackit View Post
    For the 628A...
    @ DEVICE MCLRE_OFF, INTRC_OSC, WDT_OFF, LVP_OFF, BOD_OFF, PWRT_ON, PROTECT_OFF
    And the config type you are using is for PM. Is that set correctly in MCS?
    thanks for the reply,

    I tried your suggestion but I keep getting an error
    Attached Images Attached Images  

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