No Need for any include...
and yup, the config statement is wrong...
Presetting Configuration Fuses (PIC Defines) into your Program
http://www.picbasic.co.uk/forum/showthread.php?t=543
Code:@ __CONFIG _CONFIG1H, _XT_OSC_1H
No Need for any include...
and yup, the config statement is wrong...
Presetting Configuration Fuses (PIC Defines) into your Program
http://www.picbasic.co.uk/forum/showthread.php?t=543
Code:@ __CONFIG _CONFIG1H, _XT_OSC_1H
Last edited by mister_e; - 3rd December 2007 at 15:29.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Make sure you are using MPASM.
And I still follow the instructions here. http://www.picbasic.co.uk/forum/show...87&postcount=6
Maybe this has been fixed or changed , but still works for me.
Dave
Always wear safety glasses while programming.
this have been fix in 2.47 If you want to use the new syntax, maybe you need to do it in the INC file... i never tried. I still use the old syntax.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Thanks for the update.
I set the fuses in the *.inc file. I should try it in the program some day.
One of the first things I did when I up graded to 2.47 was changed the *.inc, never noticed the fix
This is part of my *.inc .
Code:CONFIG OSC = INTIO2 CONFIG LVP = OFF CONFIG BOR = OFF CONFIG MCLRE = OFF ; __CONFIG _CONFIG1H, _XT_OSC_1H ; __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H ; __CONFIG _CONFIG4L, _LVP_OFF_4L
Dave
Always wear safety glasses while programming.
Looks like I need to upgrade PBP as I have only version 2.44
MPASM or MPASMWIN ?
Suggestions on which Microcode version to use or
A windows version of PBP ? (Is Microcode the windows version?
kind regards for all of the answers.
Peter
Pete
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.
MPASM don't work with DEVICE, you MUST use __CONFIG and it's related syntax.
Have a look at the faq, always the same link
http://www.picbasic.co.uk/forum/showthread.php?t=543
For the config deprecated stuff, you may edit your INC file OR just insert the following line..
@ ERRORLEVEL -230
at the top of your code.
As soon as possible, i'll suggest you to update your PBP to 2.50
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
You should upgrade but 2.44 supports this chip.
I use MPLAB and It does use MPASMWIN, never told it to, built in I guess. Why the PBP *.inc file says to use MPASM? Must be for command line work?MPASM or MPASMWIN ?
Use MPLAB.Suggestions on which Microcode version to use or
PBP is a windows program. I run MPLAB with PBP as the language tool suite. I am a LINUX user so I also have to use WINE for the windows part.A windows version of PBP ? (Is Microcode the windows version?
Dave
Always wear safety glasses while programming.
Bookmarks