Presetting Configuration Fuses (PIC Defines) into your Program


Results 1 to 40 of 83

Threaded View

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


    Did you find this post helpful? Yes | No

    Default Warning[230] __CONFIG has been deprecated for PIC18 devices.

    If you are using any PIC18 serie, you will have this warning one day or another. Our friends from Microchip decide to change the way to define the config fuses when using the latest MPASM version 5.00.

    The solution is still located at the same place... at the end of the 18XXXX.INC file located in the MPASM folder.
    Quote Originally Posted by Snip of MPASM 18F452.INC

    ; IMPORTANT: For the PIC18 devices, the __CONFIG directive has been
    ; superseded by the CONFIG directive. The following settings
    ; are available for this device.
    ;
    ; Oscillator Selection:
    ; OSC = LP LP
    ; OSC = XT XT
    ; OSC = HS HS
    ; OSC = RC RC
    ; OSC = EC EC-OSC2 as Clock Out
    ; OSC = ECIO EC-OSC2 as RA6
    ; OSC = HSPLL HS-PLL Enabled
    ; OSC = RCIO RC-OSC2 as RA6
    SO now the new method to set the config fuse on the PIC18 serie is...
    Code:
    @ CONFIG OSCS=OFF, OSC=HS
        ' Oscillator switch OFF
        ' Use HS oscillator (20MHZ here)
        '
    @ CONFIG BOR=ON, PWRT=ON, BORV=45
        ' Brown out reset ON @ 4.5Volts
        ' Power-up timer ON
        '
    @ CONFIG WDT=ON
        ' Watch dog timer ON
        '
    @ CONFIG STVR=ON, LVP=OFF, DEBUG=OFF
        ' Stack over/underflow ON
        ' Low Voltage programming OFF
        ' Background debugger OFF
    Or if you prefer...
    Code:
    ASM
        CONFIG OSCS=OFF  ; Oscillator switch OFF
        CONFIG OSC=HS    ; Use HS oscillator (20MHZ here)
        CONFIG BOR=ON    ; Brown out reset ON 
        CONFIG BORV=45   ; Brown out detect voltage=4.5 Volt
        CONFIG PWRT=ON   ; Power-up timer ON      
        CONFIG WDT=ON    ; Watch dog timer ON
        CONFIG STVR=ON   ; Stack over/underflow ON
        CONFIG LVP=OFF   ; Low Voltage programming OFF
        CONFIG DEBUG=OFF ; Background debugger OFF
        ENDASM
    Don't forget to comment the default PBP config fuses...
    Last edited by mister_e; - 29th October 2005 at 23:32.
    Steve

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

Similar Threads

  1. pic program crashing
    By comwarrior in forum General
    Replies: 5
    Last Post: - 8th July 2009, 17:33
  2. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 15:46
  3. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 09:26
  4. size of program vs mem on pic
    By PICMAN in forum General
    Replies: 1
    Last Post: - 1st March 2005, 18:23
  5. Serial communication PIC to PIC help.
    By Rubicon in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th January 2005, 16:45

Members who have read this thread : 5

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