Need help with config


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Use Mpasm

    Hi Darrenmac,
    Microcode Studio defaults to using the PM assembler, to use MPASM you have to tell it to, here is how: 1.start micro code studio 2. click on the word VIEW at the very top left. 3. Click on Compile and Program Options, and it will open a box which has at it's top, 3 tabs, notice on the first tab an empty box which says use PBL, but do not put a check there, click the center tab marked assembler. You will see an empty box marked: USE MPASM. Put a check mark there and close the box. You are now using MPASM as the assembler.
    JS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  2. #2
    Join Date
    Mar 2004
    Posts
    74


    Did you find this post helpful? Yes | No

    Default

    So do I use
    @ MCLR_OFF
    or
    MCLR_OFF

  3. #3
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    94


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrenmac View Post
    So do I use
    @ MCLR_OFF
    or
    MCLR_OFF
    Hi Darrenmac,

    If you have not changed your settings as per Joe S's last post then you are using the PM assembler as this is what Microcode Studio defaults to. In this case see Post#2 in this thread.

    If you have changed your settings as per Joe's last post then you need to use:

    Code:
    @ __CONFIG _INTOSC & _MCLRE_OFF
    Cheers

    Rob

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi Darrenmac,
    Now after you do all this you will get a compile error telling you you are overwriting the configs . . . that's because you are. In your PBP directory you will have many files with the suffix .inc and the filename will be the number of your PIC. Open it and you will see the following code:
    Code:
    __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _CP_OFF
    just put a semi colon at the beginning like this:
    Code:
    ;__config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _CP_OFF
    save the file and then no more error. This config is the " DEFAULT" config setting in case you forget to put in any config so your program will still work sometimes.<br>
    Now, why go through all of this? Well suppose you DO NOT want to use the internal oscillator? The DEFAULT configs will not work with a crystal or resonator or EXT oscillator, so do it now and get used to setting the fuses early into your adventure into PIC Magic
    Last edited by Archangel; - 21st February 2008 at 12:49.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  5. #5
    Join Date
    Mar 2004
    Posts
    74


    Did you find this post helpful? Yes | No

    Default

    Still having issues, I think that I am going to be better off by setting them in the programmer. At least I can get it to work. Thanks for every one who has tried to help

  6. #6


    Did you find this post helpful? Yes | No

    Default

    Setting them in the programmer works. but if you ever want to just program a chip from a saved hex file, your going to get bit in the behind if you don't remember what settings you used in the programmer. its really a two step operation. PBP is the basic compiler, it creates an assembler file. then either pm or msasm compiler assembles that into your hex file that gets programmed into the chip. the fuse names/settings are written into your basic program but are dependant upon which assembler you use. The assembler is what uses these config commands. PBP passes these to the assembler with the @. so your line would be either
    Code:
     @_config MCLR OFF
    or
    Code:
     @_config MCLRE OFF
    depending on if pm or msasm is used.

  7. #7


    Did you find this post helpful? Yes | No

    Default oops

    thats actually
    Code:
     @_config _MCLR_OFF
    or
    Code:
     @_config MCLRE_OFF
    the hs osc you were trying should be
    Code:
    @_config _HS_OSC
    or
    Code:
    @_config HS_OSC
    someone please check my writing, i can't see the _'s during preview on here. (not at home and using my phone lol)

Similar Threads

  1. Run-Time Config
    By Darrel Taylor in forum PBP Extensions
    Replies: 1
    Last Post: - 1st February 2012, 17:26
  2. A/D conversion with PIC18F67J50
    By ScaleRobotics in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 8th May 2009, 02:48
  3. 18F4550 Bootloader enter via eeprom setting
    By bradb in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 23rd November 2008, 00:51
  4. Error 0X0000008E when connecting a 18F2550 USB HID
    By FranciscoMartin in forum USB
    Replies: 8
    Last Post: - 16th October 2008, 18:20
  5. Installation sequence
    By Demon in forum General
    Replies: 23
    Last Post: - 11th July 2006, 04:56

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