port 16f872 to 16f882, assembly

MaxHeadRoom

Joined Jul 18, 2013
21,261
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.
 

Thread Starter

bug13

Joined Feb 13, 2012
1,863
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.
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!
 

Thread Starter

bug13

Joined Feb 13, 2012
1,863
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
 

absf

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

Allen
 

Thread Starter

bug13

Joined Feb 13, 2012
1,863
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
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
 
Top