18f4320


Closed Thread
Results 1 to 9 of 9

Thread: 18f4320

  1. #1
    Join Date
    Feb 2005
    Posts
    67

    Unhappy 18f4320

    Brand New Proccesor Attempt !

    I am using microcode studio Pic Basic Pro.

    Initial Test

    @ INCLUDE 18F4320.INC
    __CONFIG_CONFIG1H,_XT_OSC_1H ' This is line 21

    Hit F9 (Compile)

    ERROR Line 21: Syntax Error

    I looked and looked and tried, but waht is the syntax error !!!

    Help, please

    kind regards

    Peter
    Pete

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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.

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    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.

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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.

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    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.

  6. #6
    Join Date
    Feb 2005
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    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

  7. #7
    Join Date
    May 2006
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    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.

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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.

  9. #9
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Peter1960 View Post
    Looks like I need to upgrade PBP as I have only version 2.44
    You should upgrade but 2.44 supports this chip.
    MPASM or MPASMWIN ?
    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?
    Suggestions on which Microcode version to use or
    Use MPLAB.
    A windows version of PBP ? (Is Microcode the windows version?
    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.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. I do not not like 18F4320
    By Peter1960 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th December 2007, 10:15

Members who have read this thread : 0

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