18F2620 compile problems in PBP


Closed Thread
Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2006
    Posts
    65

    Default 18F2620 compile problems in PBP

    I'm trying to bring up a new design using the 18F2620 for the first time, using PBP 2.46. I'm getting compile error messages saying that the PBP assembler doesn't support the 18F2620, and suggesting that I use the MPASM assembler.

    Does PBP support the 18F2620 natively, or do I really need to use MPASM?

    Joe

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    You can tell PBP to use MPASM rather than the default PM.

    Example Command Lines (depending on your installation)...

    PBPW -p18F2620 MyFile -ampasm

    PBPW -p18F2620 MyFile -ampasmwin

  3. #3
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    The 18F2620 was already supported in version 2.45. When you use 2.46 it should work. Maybe you forgot something to tell to the compiler.

  4. #4
    Join Date
    Aug 2006
    Posts
    65


    Did you find this post helpful? Yes | No

    Default

    Thanks folks...I got it to compile/assemble using MPASM. Now I have another problem. I'm trying to use the Mecanique bootloader with Mecanique's standard 4 MHz 18F2620 bootloader hex file, but I want to use the internal 4 MHz PIC clock. The internal clock seems to be defaulting to 1 MHz. Can anyone suggest how to get around this without a custom bootloader file?

    I'm using a Melabs USB programmer with Melabs driver to program the part.

    Joe

  5. #5
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    If it works like the 8722, when you load the bootloader in the chip, you can set the config fuses so that the PLL is enabled. The 1Mhz default will be multiplied by 4, giving you the 4Mhz you want.
    Charles Linquist

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    The MCS boot-loader firmware has config fuse options already set. You cannot over-ride these when loading your code into the target using the boot-loader software.

    I.E. whatever the config fuse settings are in the loader firmware you're stuck with.

    The only way to change config fuse settings, when using the MCS boot-loader, is to re-program the PIC with a different boot-loader firmware file.

    Whatever config fuse settings you may have embedded in your .hex file at compile time are simply ignored when you load your code using the boot-loader software. The boot-loading process does not alter config fuse settings.

    Note: The MCS boot-loader works only with an external oscillator. If you change this in the loader firmware before programming, it probably isn't going to work. At least not reliably.
    Last edited by Bruce; - 12th August 2006 at 04:09.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  7. #7
    Join Date
    Aug 2006
    Posts
    65


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce

    ......Note: The MCS boot-loader works only with an external oscillator. If you change this in the loader firmware before programming, it probably isn't going to work. At least not reliably.
    ----------------

    Bruce,

    Why so? Why can't I write a loader that uses the internal clock? It certainly can't be an accuracy/stability issue - I have thousands of units in the field for a couple of years running serial comms with the internal clock over very wide temperature ranges. That much works fine.

    And if I CAN write a loader that uses the internal clock, then why can't I modify the MCS loader to do the same by disassembling, modifying, and reassembling?

    Thanks

    Joe

  8. #8
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Hi Joe,

    You can modify the MCS loader files if you like. They just won't work as-is
    with the internal oscillator.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  9. #9
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    I over-rode the bootloader config settings.

    I use the Microchip ICD2 to program the bootloader into the device. If you first load the proper bootloader file, you can then change the configuration fuse settings in the ICD2 "config" section. Program the part, and away you go.

    I have programmed several 18F8722s that had no external oscillator whatsoever. I simply set the "PLL ENABLED" and "Internal OSC" options in MPLAB and programmed it with the 4Mhz bootloader. MCLoader had no trouble at all loading my program files.
    Charles Linquist

  10. #10
    Join Date
    Aug 2006
    Posts
    65


    Did you find this post helpful? Yes | No

    Default

    Thanks for the helpful suggestion Charles. It's always great to hear waht CAN be done instead of what CAN't be done

    Joe

Similar Threads

  1. PBP v2.60 upgrade: MCSP compile issue
    By ScaleRobotics in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 23rd July 2009, 19:49
  2. PBP 2.50 UPGRADE problems!!!!
    By earltyso in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 7th March 2008, 15:42
  3. Compile problems
    By ffindog in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 25th June 2007, 02:51
  4. need 18F4550.BAS to compile with PBP?
    By jocovo in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd December 2006, 01:23
  5. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2005, 23:30

Members who have read this thread : 1

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