#config...#endconfig


Closed Thread
Results 1 to 17 of 17

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 Re: #config...#endconfig

    Got to
    C:\PBP3\DEVICE_REFERENCE
    and find the file for you chip.

    But the (') in your config statement might be causing some of you trouble.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    May 2005
    Location
    Ne ohio
    Posts
    21


    Did you find this post helpful? Yes | No

    Default Re: #config...#endconfig

    thanks,
    that helps a lot seeing where they are located as a reference
    but...
    CONFIG WDTE = OFF
    still gives "CONFIG directive Error: (setting "WDTE in the supplied MicroCode IDE.

    both ON and OFF give the same error for my 18f6722 chip.

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


    Did you find this post helpful? Yes | No

    Default Re: #config...#endconfig

    Try this
    #CONFIG
    __CONFIG _CONFIG1H, _OSC_HS_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
    __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
    __CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _BBSIZ_BB2K_4L & _XINST_OFF_4L

    #ENDCONFIG
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    May 2005
    Location
    Ne ohio
    Posts
    21


    Did you find this post helpful? Yes | No

    Default Re: #config...#endconfig

    thanks,

    Yes that compiles OK
    I turned the WDT off though. don't know what the other options are....

    where can I get the reference on these options? they don't look like the ones in the INFO file.
    what is the CONFIG1H through CONFIG4L about. Is that something in the microchip files?

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


    Did you find this post helpful? Yes | No

    Default Re: #config...#endconfig

    To get the complete or correct configuration information you need to look at the, for this chip, P18F6722.INC file. This is in
    C:\Program Files\Microchip\MPASM Suite
    Do not modify this file, the info is near the end.
    The CONFIG1H through CONFIG4L is just different places the various bit are stored.
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: #config...#endconfig

    Quote Originally Posted by ptig185 View Post
    ...I turned the WDT off though. don't know what the other options are....

    I usually try to turn off as much stuff as possible. I figure they cost overhead that I could use for my own program instead.

    Then I turn features on as I need them 'cause I often turn off too much stuff.

    Robert


    EDIT: Maybe this might shed some light on features:

    http://www.picbasic.co.uk/forum/cont...-for-Beginners
    Last edited by Demon; - 2nd September 2012 at 00:21.

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


    Did you find this post helpful? Yes | No

    Default Re: #config...#endconfig

    Quote Originally Posted by Demon View Post
    I usually try to turn off as much stuff as possible. I figure they cost overhead that I could use for my own program instead.
    A config bit is either on or off, but it is still a bit.
    Dave
    Always wear safety glasses while programming.

  8. #8
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: #config...#endconfig

    Quote Originally Posted by mackrackit View Post
    A config bit is either on or off, but it is still a bit.
    I know, but don't features generate more code if they are active?

    PWM, USB, etc.

    Robert


    EDIT: An example of unnecessary overhead:

    ADON: ADC Enable bit
    1 = ADC is enabled
    0 = ADC is disabled and consumes no operating current
    I rarely use ADC, apparently having it on for nothing would consume current needlessly (probably very little, but still).
    Last edited by Demon; - 3rd September 2012 at 07:20.

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


    Did you find this post helpful? Yes | No

    Default Re: #config...#endconfig

    Quote Originally Posted by ptig185 View Post
    thanks,

    Yes that compiles OK
    I turned the WDT off though. don't know what the other options are....

    where can I get the reference on these options? they don't look like the ones in the INFO file.
    what is the CONFIG1H through CONFIG4L about. Is that something in the microchip files?
    http://ww1.microchip.com/downloads/e...Doc/39646c.pdf
    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.

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