I am looking to possibly migrate from a 16F690 to the PIC18F2520 and am having problems when compiling it with Microcode studio. I am using PIC BASIC PRO 2.46. Not sure what version of MPASMWIN I have running. If I try compile this in Microcode studio, the Microchip MPASM v5.13 is invoked and I get the following:
Error[122] c:\projects\1631\progr2.asm 353:Illegal opcode(pic18F2520)
Warning[207] c:\projects\1631\progr2.asm 353 : Found label after column 1 (DEVICE)
There are a bunch of these and I am sure they are for the configuration files.
My configuration code is this:
@ DEVICE pic18F2520, XT_OSC
' System Clock Options
@ DEVICE pic18F2520, WDT_ON
' Watchdog Timer
@ DEVICE pic18F2520, PWRT_ON
' Power-On Timer
@ DEVICE pic18F2520, MCLR_OFF
' Master Clear Options (Internal)
@ DEVICE pic18F2520, BOD_ON
' Brown-Out Detect
@ DEVICE pic18F2520, CPD_OFF
' Data Memory Code Protect
' Set to CPD_OFF for Development Copy
' Set to CPD_ON for Release Copy
@ DEVICE pic18F2520, PROTECT_ON
' Program Code Protection
' Set to PROTECT_OFF for Development Copy
' Set to PROTECT_ON for Release Copy
======================
When I opened the file in MPLAB and compile it I receive the following:
Executing: "C:\pbp\PBPW.EXE" -ampasmwin -oq -z -p18F2520 " 18F2520 prog w LCD v00.pbp"
PicBasic Pro Compiler 2.46, (c) 1998, 2005 microEngineering Labs, Inc.
All Rights Reserved.
Warning[230] C:\PBP\18F2520.INC 20 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
Warning[230] C:\PBP\18F2520.INC 21 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
Warning[230] C:\PBP\18F2520.INC 22 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
Warning[230] C:\PBP\18F2520.INC 23 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
Warning[207] C:\PROJECTS\1631\PROG\18F2520 PROG W LCD V00.ASM 321 : Found label after column 1. (DEVICE)
Error[122] C:\PROJECTS\1631\PROG\18F2520 PROG W LCD V00.ASM 321 : Illegal opcode (pic18F2520)
Warning[207] C:\PROJECTS\1631\PROG\18F2520 PROG W LCD V00.ASM 329 : Found label after column 1. (DEVICE)
Error[122] C:\PROJECTS\1631\PROG\18F2520 PROG W LCD V00.ASM 329 : Illegal opcode (pic18F2520)
Loaded C:\Projects\1631\Prog\18F2520 prog w LCD v00.COD.
BUILD SUCCEEDED: Mon Dec 03 16:26:14 2007
==================================
I have not tried to bread board the micro yet to see if it works.
Is there something or some way that I can compile the code to keep from getting errors? Any thoughts? Thanks for all the help.
Bookmarks