port 16f872 to 16f882, assembly

Discussion in 'Embedded Systems and Microcontrollers' started by bug13, Mar 14, 2016.

  1. bug13

    Thread Starter Well-Known Member

    Feb 13, 2012
    1,208
    38
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,541
    2,369
    There should be very little difference they are almost identical in modules both are 28pin and Picmicro generally keep the pin No's/types the same across a same pin count.
    Max.
     
  3. bug13

    Thread Starter Well-Known Member

    Feb 13, 2012
    1,208
    38
    That's good news!

    I only have use mplab x, but never use mplab8. To start with, it seems I need 16F882.inc file instead of 16F872.inc, I have searched the whole computer, but I can't find this file.

    Do you know where I maybe able to find this 16F882.inc file?

    Thanks!
     
  4. bug13

    Thread Starter Well-Known Member

    Feb 13, 2012
    1,208
    38
    I found the 16f882.inc
     
  5. bug13

    Thread Starter Well-Known Member

    Feb 13, 2012
    1,208
    38
    Now I have these error, what is that mean?

    This is the line I have the problem:
    __config _HS_OSC & _WDT_OFF & _DEBUG_ON & _LVP_OFF & _CPD_OFF & _WRT_OFF & _PWRTE_OFF

    ----------------------------------------------------------------------
    Release build of project `C:\Users\zhuhua.MIRACLE\Desktop\CC3A\CC3A-wdf.mcp' started.
    Language tool versions: MPASMWIN.exe v5.46, mplink.exe v4.44, mplib.exe v4.44
    Tue Mar 15 10:19:15 2016
    ----------------------------------------------------------------------
    Clean: Deleting intermediary and output files.
    Clean: Done.
    Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F882 "cc3a.asm" /l"cc3a.lst" /e"cc3a.err"
    Error[126] C:\USERS\JOE.MIRACLE\DESKTOP\CC3A\CC3A.ASM 32 : Argument out of range (not a valid config register address)
    Halting build on first failure as requested.
    ----------------------------------------------------------------------
    Release build of project `C:\Users\zhuhua.MIRACLE\Desktop\CC3A\CC3A-wdf.mcp' failed.
    Language tool versions: MPASMWIN.exe v5.46, mplink.exe v4.44, mplib.exe v4.44
    Tue Mar 15 10:19:16 2016
    ----------------------------------------------------------------------
    BUILD FAILED
     
  6. absf

    Senior Member

    Dec 29, 2010
    1,492
    372
    The 16F882 inc file is in the
    "C:\Program Files\Microchip\MPASM Suite" directory of my MPLAB IDE v8.80

    Allen
     
  7. bug13

    Thread Starter Well-Known Member

    Feb 13, 2012
    1,208
    38
    Thanks, found it
     
  8. bug13

    Thread Starter Well-Known Member

    Feb 13, 2012
    1,208
    38
    It seems to work if I do these.

    __config _CONFIG1, _CP_OFF & _HS_OSC & _WDT_OFF & _BOREN_OFF & _DEBUG_OFF & _LVP_OFF & _CPD_OFF & _PWRTE_OFF
    __config _CONFIG2, _WRT_OFF
     
Loading...