Fuses Again


Closed Thread
Results 1 to 16 of 16

Thread: Fuses Again

  1. #1

    Exclamation Fuses Again

    as it seems i have to go beyond pbp to get certain programs to work

    damm fuses again

    i am trying something very simple to start the training

    chip 16f627a
    assembler mpasm

    trying to set chip for external osc because most people say this is required to run serial communications

    tried the following statements
    @ device xt_osc

    @device pic16f627a,xt_osc

    @_config_xt_osc

    _config_xt_osc

    all commands generate error messages in a simple 4 line program which assembles fine without the commands

    wish pbp would include these setups as part of the compileing

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


    Did you find this post helpful? Yes | No

    Thumbs up

    Have a look to the following. Everything should be covered.

    Presetting Configuration Fuses (PIC Defines) into your Program
    http://www.picbasic.co.uk/forum/showthread.php?t=543
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3


    Did you find this post helpful? Yes | No

    Cool link

    mister e
    thats where i went to get started seemed simple enough
    however all the commands shown see above
    generate a error

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


    Did you find this post helpful? Yes | No

    Default

    errors or warning.. that's the question!

    tell me
    1. the error number your program return e.g. Error[118]c:\... Overwriting previous address content (2007)
    2. MPASM version
    3. PBP version
    4. your config line
    5. the modified .INC file in your PBP folder.

    Here, PBP 2.47, MPASM 5.06
    Code:
            @ __CONFIG  _INTRC_OSC_NOCLKOUT & _MCLRE_ON  &  _LVP_OFF & _WDT_OFF & _PWRTE_ON  & _BODEN_ON
    and the 16F627A.INC file
    Code:
    ;****************************************************************
    ;*  16F627A.INC                                                 *
    ;*                                                              *
    ;*  By        : Leonard Zerman, Jeff Schmoyer                   *
    ;*  Notice    : Copyright (c) 2003 microEngineering Labs, Inc.  *
    ;*              All Rights Reserved                             *
    ;*  Date      : 11/06/03                                        *
    ;*  Version   : 2.45                                            *
    ;*  Notes     :                                                 *
    ;****************************************************************
            NOLIST
        ifdef PM_USED
            LIST
            include 'M16F62xA.INC'  ; PM header
            ;device  pic16F627A, xt_osc, wdt_on, mclr_on, lvp_off, protect_off
            XALL
            NOLIST
        else
            LIST
            LIST p = 16F627A, r = dec, w = -302
            INCLUDE "P16F627A.INC"  ; MPASM  Header
            ;__config _XT_OSC & _WDT_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF
            NOLIST
        endif
            LIST
    Last edited by mister_e; - 22nd February 2007 at 01:06.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jcleaver View Post
    as it seems i have to go beyond pbp to get certain programs to work

    damm fuses again

    i am trying something very simple to start the training

    chip 16f627a
    assembler mpasm

    trying to set chip for external osc because most people say this is required to run serial communications

    tried the following statements
    @ device xt_osc

    @device pic16f627a,xt_osc

    @_config_xt_osc

    _config_xt_osc

    all commands generate error messages in a simple 4 line program which assembles fine without the commands

    wish pbp would include these setups as part of the compileing
    Computers are stupid, PICs are stupid, they are not however, sloppy. So when they want some piece of code they will not accept a peace of kode, because they are stupid.
    Now look at mister_e's code, the word config is preceded by __ not _ , that's two little Hyphen slash thingies, not one.
    I hope this helps.
    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.

  6. #6


    Did you find this post helpful? Yes | No

    Default

    pbp 2.46 mpsam 5.


    errors 113 and 118 are listed when i try the first line above


    this is warning with the second part above

    WARNING: Unable to open INCLUDE file P16F627A.INC.
    ERROR Line 25: Syntax error. (mistre.pbp)
    ERROR Line 26: Bad parameter to LIST command. (mistre.pbp)
    ERROR Line 27: Syntax error. (mistre.pbp)
    ERROR Line 31: ELSE without a matching IF..THEN. (mistre.pbp)
    ERROR Line 32: Bad parameter to LIST command. (mistre.pbp)
    ERROR Line 33: Bad parameter to LIST command. (mistre.pbp)
    ERROR Line 37: ENDIF without a matching IF..THEN. (mistre.pbp)
    ERROR Line 38: Bad parameter to LIST command. (mistre.pbp)

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


    Did you find this post helpful? Yes | No

    Default

    post your whole code... and make sure your MPASM PATH is right and MPASM is checked in the Compile and Program Option> assembler tab of MicroCode Studio.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  8. #8


    Did you find this post helpful? Yes | No

    Default update

    only getting overwriteing previous address error now is that ok


    also your first line did not give xt-osc which is all i really am trying to start with

    attached file

    mpsam is working perfectly expect when i try fuses
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Default

    sorry, i misread your first post. Anyways, you'll need this one
    Code:
    @ __CONFIG  _XT_OSC & _MCLRE_ON  &  _LVP_OFF & _WDT_OFF & _PWRTE_ON  & _BODEN_ON
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  10. #10


    Did you find this post helpful? Yes | No

    Question ty

    thanks that seems to work except for the overwrite error
    is that a problem??

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


    Did you find this post helpful? Yes | No

    Default See post # 4 this thread

    Quote Originally Posted by jcleaver View Post
    thanks that seems to work except for the overwrite error
    is that a problem??
    Hi Jack,
    Look at post #4 in this thread. Mr E. explained what to do to eliminate the last error of which you speak. The compiler sees the config default settings in the INC file and then sees the config setting in your code, and guess what it does?
    It ignores the setting in your code and goes with the default. So just add a semicolon ahead of the two statements he showed you and the compiler will forevermore do what you tell it for this chip. You will have to edit each individual inc file as needed. So why is that statement even in there? Did you ever compile a program without setting the configs? Did it work? Yes it probably did if you used a 4mhz chrystal, because of the default configs.
    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.

  12. #12
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default Is "FUSES" the right term ???

    Just a thought....


    ...now that we mostly work with Flash devices rather than OTP, shouldnt we be referring to "Configuration Circuit Breakers" rather than "Configuration Fuses" because we can reset them.

    Keith

    www.diyha.co.uk
    www.kat5.tv

  13. #13


    Did you find this post helpful? Yes | No

    Default inc files

    joe thanks for the info i guess what you are saying is i need to find the
    inc file for this chip and rem out the config statement so it writes it according to my programs

    the problem, which i had earlier and never really found a answer is i am not sure where it is looking for these files as i have many inc files for this chip
    got installed with some programmers and mpsam so really dont know which file to use.
    if i try the first part besides getting the error of overwriteing it will not go out to the programmer

    also if i try to use the second part of posting #4 i get huge errrors see my later listing
    so basically niether statement works for me
    must be a simpler way

    thanks

    jack
    Last edited by jcleaver; - 24th February 2007 at 15:18.

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


    Did you find this post helpful? Yes | No

    Default

    http://www.picbasic.co.uk/forum/show...75&postcount=5

    We talk about commenting the PBP default ones. THE .INC file is located in the PBP folder.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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


    Did you find this post helpful? Yes | No

    Default Sometimes it's more who you know than what you know.

    Quote Originally Posted by Joe S. View Post
    Hi Jack,
    Look at post #4 in this thread. Mr E. explained what to do to eliminate the last error of which you speak. The compiler sees the config default settings in the INC file and then sees the config setting in your code, and guess what it does?
    It ignores the setting in your code and goes with the default. So just add a semicolon ahead of the two statements he showed you and the compiler will forevermore do what you tell it for this chip. You will have to edit each individual inc file as needed. So why is that statement even in there? Did you ever compile a program without setting the configs? Did it work? Yes it probably did if you used a 4mhz chrystal, because of the default configs.
    What I am really saying is despite my inability to spell crystal properly, follow mister_e's instructions and you will be right 99.9999999062 % of the time, He will never intentionaly lead you astray! Same with most all of the other " BIG GUNS" in this forum same applies to BIG 'UNS too . I wish he was an investment counselor !
    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.

  16. #16


    Did you find this post helpful? Yes | No

    Default update

    might want to take a look at mikroelekronika there assembler and programer
    make duck soup out of working with fuses just check off like a list
    looks very simple

Similar Threads

  1. Presetting Configuration Fuses (PIC Defines) into your Program
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 82
    Last Post: - 15th December 2013, 09:54
  2. old chestnut, 18f2550, fuses, osc's leds...
    By f_lez in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 31st October 2009, 17:18
  3. 18F4620 Fuses configuration
    By Pimentel in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th October 2008, 13:23
  4. 18F Config fuses
    By Angus Anderson in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 18th December 2007, 15:59
  5. configuration fuses
    By mischl in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th April 2005, 10:50

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