18F4620 Fuses configuration


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Aug 2008
    Posts
    66


    Did you find this post helpful? Yes | No

    Default

    You can use back the previous code. Just replace pic16F628a with pic18F4620.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Not quite right Pic2008...

    18F PICs require you to use the MPASM Assembler... and MPASM does not recognise the @ DEVICE syntax that configures the Config Fuses in the same way that the default PM Assembler does. Here is an example for a PIC18F2420...

    Code:
    	'
    	'	PIC Defines for PIC18F2420
    	'	==========================
    
    	@ __CONFIG    _CONFIG1H, _IESO_OFF_1H & _FCMEN_OFF_1H & _OSC_XT_1H
    							' Oscillator Switch-over Disabled
    							' Fail-Safe clock Monitor Disabled
    							' Set for external XT Oscillator RA6 & RA7 disabled
    	@ __CONFIG    _CONFIG2L, _BOREN_OFF_2L & _PWRT_ON_2L & _BORV_0_2L
    							' Brown-Out Reset Enabled
    							' Power-On Timer Enabled
    							' Brown-Out Trip set to 4.2v
            @ __CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
    							' WatchDog is ON
    							' Watchdog Postscaler set to 1:128
    	@ __CONFIG    _CONFIG3H, _MCLRE_ON_3H & _PBADEN_OFF_3H & _CCP2MX_PORTC_3H
    							' MCLR is ON (external) PortE.3 is DISABLED
    							' PortB 4:0 is digital on Reset
    							' CCP2 is Multiplexed with PortC.1
            @ __CONFIG    _CONFIG4L, _STVREN_ON_4L & _XINST_OFF_4L & _LVP_OFF_4L & _DEBUG_OFF_4L
    							' Stack Under/Overflow will Reset System
    							' Enhanced CPU Addressing Disabled
    							' Low-Voltage Programming is OFF
    							' DEBUG is Disabled
    	@ __CONFIG    _CONFIG5L, _CP1_ON_5L & _CP0_ON_5L
    							' All Code Protect
            @ __CONFIG    _CONFIG5H, _CPB_ON_5H & _CPD_ON_5H
    							' EEPROM is Code Protected
    							' Boot Block code is Code Protected

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, 10:54
  2. meProg configuration vs setting fuses in code
    By AndrewC in forum General
    Replies: 2
    Last Post: - 10th June 2008, 15:00
  3. Coding Style - PIC 18F4620 config fuses
    By BrianT in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th January 2008, 21:05
  4. 18f4620 Configuration bits
    By Raflex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 13th September 2006, 21:32
  5. configuration fuses
    By mischl in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th April 2005, 11: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