18F1220 fuse help


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi,

    Both methods work ...

    the old one still is in "old" devices .inc files :

    Code:
    ; To embed the Configuration Bits in your source code, paste the
    ; following lines into your source code in the following format,
    ; and change the configuration value to the desired setting (such
    ; as WDT_OFF to WDT_ON).
    ; These lines are commented out - each __CONFIG line should have the
    ; preceding semicolon (;) removed when pasted into your source code.
    ; __CONFIG _CONFIG1H, _IESO_ON_1H & _FSCM_OFF_1H & _RC_OSC_1H
    ; __CONFIG _CONFIG2L, _PWRT_ON_2L & _BOR_OFF_2L & _BORV_27_2L
    ; __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_32K_2H
    ; __CONFIG _CONFIG3H, _MCLRE_ON_3H
    ; __CONFIG _CONFIG4L, _DEBUG_OFF_4L & _LVP_ON_4L & _STVR_ON_4L
    ; __CONFIG _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L
    ; __CONFIG _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
    ; __CONFIG _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L
    ; __CONFIG _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H
    ; __CONFIG _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L
    ; __CONFIG _CONFIG7H, _EBTRB_OFF_7H
    from the "up to date" .inc file of the '1320 ... ( MPLAB 8.50 )

    using those, we only Get an "Info message" from MPASM ... telling there's a new ( simplified ??? ) way ...

    The old way advantage ??? ... there are templates available in the MPASM .inc files !!!

    Alain

    PS:

    in MPLAB, for Pic 18 ... there's a tool named Visual initializer ... that could help.
    see :

    Code:
    ; Initialization Code for PIC18F2520, Family: GP control, Package: 28-Pin SDIP 28pins
    #include P18F2520.inc
     
     
    ; Filter Controls used to Generate Code:
    ; POR Match Filter OFF
    ; Provisioned Feature Filter OFF
    ; Masks are Ignored and uses UnMasked Register Writes
    ; Feature=fuses - fuses (DCR) configuration
    ; B7=IESO B6=FCMEN B3:0=FOSC3:0
    CONFIG1H=0x02
    ; B4:3=BORV1:0 B2:1=BOREN1:0 B0=PWRTEN-L
    CONFIG2L=0xEB
    ; B4:1=WDTPS3:0 B0=WDTEN
    CONFIG2H=0xE0
    ; B7=MCLRE B2=LPT1OSC B1=PBADEN B0=CCP2MX
    CONFIG3H=0xFF
    ; B7=DEBUG-L B6=XINST B2=LVP B0=STVREN
    CONFIG4L=0xFF
    ; B3:0=CP3:0
    CONFIG5L=0xFF
    ; B7=CPD B6=CPB
    CONFIG5H=0xFF
    ; B3:0=WR3:0
    CONFIG6L=0xFF
    ; B7=WRTD B6=WRTB B5=WRTC
    CONFIG6H=0xFF
    ; B3:0=EBTR3:0
    CONFIG7L=0xFF
    ; B6=EBTRB
    CONFIG7H=0xFF
     
    ...
    isn't life marvellous ???
    Last edited by Acetronics2; - 24th May 2010 at 14:31.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  2. #2
    Join Date
    Nov 2008
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    Thanks Alain, glad I was doing something OK.
    I like the new method, I was never very happy with all the _underscore stuff going on with the other method so I'll stick with it.
    (Perhaps there is a need for a new template library in this forum somewhere for the new syntax).

    I'll have a look at the tool you pointed out, thanks. I got to say I'm having information overload with this particular project, I've changed PIC's twice now from my original choice, and it caused headaches both times. Hoping to settle down to writing useful code real soon.
    Cheers,
    Martin

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