Configuration fuses in source file for 18f252


Closed Thread
Results 1 to 11 of 11

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    And if you add
    DEFINE OSC 20
    near the beginning of your code you will not have to recalc the pauses

    PAUSE 1000
    will be 1 second
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Mar 2010
    Location
    Austin, TX
    Posts
    68


    Did you find this post helpful? Yes | No

    Default Progress

    Now that is progress.

    DEFINE OSC 20, is a very nice little bit of info.

    and

    @ __CONFIG _CONFIG1H, _OSCS_OFF_1H & _HS_OSC_1H

    Did the trick.

    I noticed that I can comment out the config lines in the 18f252.inc file in the c:\pbp folder and put them directly in the source, or make the changes in the .inc file directly.

    I woud rather make a copy of the .inc file and put it in the project folder to make the changes there, but when I did that, it took the values from the original .inc file in the c:\pbp.

    How can I tell it to use the modified copy in the project folder?

    Thanks,

    Mike

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


    Did you find this post helpful? Yes | No

    Default

    The compiler will read the inc file, will always read the inc file. That is why you have to comment the things in the inc that you do not want read.

    I know what you are after by making a copy of the inc for the project directory. But that would take some messing with the heart of PBP.. So that is why we have the way of putting the config settings in the code.

    I guess you code write an include file for the configs... but then you would have the include statement in your code... Just stick with the configs in code space. It works..
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Mar 2010
    Location
    Austin, TX
    Posts
    68


    Did you find this post helpful? Yes | No

    Default

    Okay... I can live with that.

    I'll work with direct ,inc changes and putting the changes in the code and see which way works best for me.

    Thank you al for the excellent help.

    I will create a new post with my accomplishments so far, thanks to your help.

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


    Did you find this post helpful? Yes | No

    Default

    For me, some chips I almost never change the fuses so I will modify the inc and leave it at that. Some chips get the fuses changed often, for those I will set them in code space.

    Just thoughts...
    Dave
    Always wear safety glasses while programming.

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