16F886 (illegal opcode CONFIG1)


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232

    Default 16F886 (illegal opcode CONFIG1)

    I am adding DT’s INT_INT to an existing and functioning program I assembled with PM. Now using MPASM I am having problems with the config’s.

    16F886, MicroCode Studio Plus, MPASM, internal osc @8Mhz

    ERROR[122] (illegal opcode CONFIG1)
    I found an example by mackrackit from 10JUNE,2010 and tried his example but it failed also.

    I’m using:
    @ __config _CONFIG1, (_INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF &_LVP_OFF & _CP_OFF)

    OSCCON = %01110000
    DEFINE OSC 8

    I’ve tried with and without the comma (,) after CONFIG1, I’ve tried with and without the brackets, and the error always says “illegal opcode CONFIG1.” I've used CONFIG1 in upper case and lower case, no go!

    Its got me stumped,Comments please!

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: 16F886 (illegal opcode CONFIG1)

    Are you sure you have the 16F886 selected in the Microcontroller dropdown box of MicroCode Studio?
    DT

  3. #3
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232


    Did you find this post helpful? Yes | No

    Default Re: 16F886 (illegal opcode CONFIG1)

    16F886 is in the dropdown window! yep!

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: 16F886 (illegal opcode CONFIG1)

    Under View > Compile and Program Options > Assembler tab ...
    Is the path above the Find buttons ... C:\Program Files\Microchip\MPASM Suite or C:\Program Files (x86)\Microchip\MPASM Suite for 64-bit systems?

    If not, click the Find manually button and point it there.
    MicroCode Studio will usually find the wrong path if you have more than one MPASMWIN on your computer.
    DT

  5. #5
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232


    Did you find this post helpful? Yes | No

    Default Re: 16F886 (illegal opcode CONFIG1)

    My path is C:\Program Files\Microchip\MPASM Suite. Yes, I am aware of this Gottcha! I had to deal with it a few years ago. I double checked it to make sure something didn't revert back to the Wrong MPASM. This just doesn't make any since. I even tried to use @config (0x20F4) but that didn't work either. I also checked my spellling four times to make sure... what else?

  6. #6
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232


    Did you find this post helpful? Yes | No

    Default Re: 16F886 (illegal opcode CONFIG1)

    Darrel, On the assembler tab page, what is INH8XM, INH8XS, and INHX32?
    Last edited by MOUNTAIN747; - 17th January 2013 at 23:26.

Similar Threads

  1. Illegal upcode
    By lerameur in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 10th November 2011, 23:31
  2. Extra I2CWRITE opcode at beginning of *.hex file
    By tturpin in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th May 2011, 03:13
  3. NTVDM CPU has encountered illegal instruction
    By Sanddune in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 19th June 2009, 04:01
  4. 16f886
    By Larry in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th November 2008, 16:57
  5. 16f886
    By hvacrtech in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 27th May 2008, 05:06

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