Illegal upcode


Closed Thread
Results 1 to 9 of 9

Thread: Illegal upcode

  1. #1
    Join Date
    Sep 2006
    Posts
    747

    Default Illegal upcode

    hello,

    I am getting illegal upcode error when i compile in Micro code studio.
    when i add this line to disable MCLR
    @ DEVICE pic16F88, MCLR_OFF

    but when compiling under the dos interface, I am not getting any error.
    any how even if it is compiling, I need to put a resistor to the MCRL pin of my 16F88.

    i am assembling using MSPASM
    any thoughts?

    I did some modification in the INC files ( both in the PBP directory and the Microchop directory) and no change.

    Ken

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


    Did you find this post helpful? Yes | No

    Default Re: Illegal upcode

    @ DEVICE pic16F88, MCLR_OFF
    Is for PM
    i am assembling using MSPASM
    http://www.picbasic.co.uk/forum/showthread.php?t=543
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Illegal upcode

    yes i did use the correcte one:
    @ __config _INTRC_OSC_NOCLKOUT & _MCLRE_OFF

    and it still gives me the same error message. I change it in the 16f88.inc and looked in the p16f88.inc files. changed it in both 16f88.inc files .. still getting the error.

    ken

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


    Did you find this post helpful? Yes | No

    Default Re: Illegal upcode

    both 16f88.inc files
    UhOh
    The P16F88.inc is NOT to be edited.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Illegal upcode

    i OPENED it and there is nothing much to be edited concerning MCLR. Do not look anything like the tutorial link you posted earlier. So no I did not touch that file. Just put it there that I went through all the files, all the possiblities I know and it does not disable it.

    Ken

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default Re: Illegal upcode

    Hi, Ken

    Surprising ... I wrote this one for a '88 3 days ago ... ( I always use MPASM ...)

    Code:
    '******************************************************************************
    'Config
    #CONFIG
     __config _CONFIG1, _CP_OFF & _CCP1_RB3 & _DEBUG_OFF & _WRT_PROTECT_OFF & _CPD_OFF & _LVP_OFF & _BODEN_OFF & _MCLR_OFF & _PWRTE_ON & _WDT_ON & _INTRC_IO
     __config _CONFIG2, _IESO_OFF & _FCMEN_OFF
    #ENDCONFIG
    OSCCON  = %01101110    ' 4 Mhz Internal RC w/ I/Os
    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Illegal upcode

    I guess you type these line in the code (micro code studio?). I did and the compiler stops at #CONFIG..

    K

  8. #8
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Illegal upcode

    do I need PBP3.0 ???

    I put your code in the header file and it works now, thanks

    K
    Last edited by lerameur; - 10th November 2011 at 23:31.

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


    Did you find this post helpful? Yes | No

    Default Re: Illegal upcode

    Yes, if you are going to use the code Alain posted.
    No, to use the chip.
    Dave
    Always wear safety glasses while programming.

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