Source Code File:"PicConfig.h"


    // Enable power up reset timer, Brown out enabled and controlled by software, brown out reset if slight dip
#pragma DATA _CONFIG2L, _PWRT_ON_2L & _BOREN_ON_2L & _BORV_0_2L
    
    // Watchdog off, prescaler set to 128
#pragma DATA _CONFIG2H, _WDT_OFF_2H & _WDTPS_128_2H

    // MCLR pin enabled, timer1 hi-power (more noise immune), 
    // PORTB default to digital I/O (for compatibility as PIC18F252 has no analogue mode on thses pins)
    // CCP2 input/output is multiplexed with RC1
#pragma DATA _CONFIG3H, _MCLRE_ON_3H & _LPT1OSC_OFF_3H & _PBADEN_OFF_3H & _CCP2MX_PORTC_3H

    // Stack full/underflow will cause Reset, Single-Supply ICSP disabled, 
    // Instruction set extension and Indexed Addressing mode disabled (Legacy mode),
    // Background debugger disabled, RB6 and RB7 configured as general purpose I/O pins
#pragma DATA _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _XINST_OFF_4L & _DEBUG_OFF_4L

    // Block 0 (000800-001FFFh) not code-protected
    // Block 1 (002000-003FFFh) not code-protected
    // Block 2 (004000-005FFFh) not code-protected
    // Block 3 (006000-007FFFh) not code-protected
#pragma DATA _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L & _CP2_OFF_5L & _CP3_OFF_5L

    // Boot block (000000-0007FFh) code-protected
    // Data EEPROM not code-protected
#pragma DATA _CONFIG5H, _CPB_ON_5H & _CPD_OFF_5H

    // Block 0 (000800-001FFFh) not write-protected
    // Block 1 (002000-003FFFh) not write-protected
    // Block 2 (004000-005FFFh) not write-protected
    // Block 3 (006000-007FFFh) not write-protected
#pragma DATA _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L & _WRT2_OFF_6L & _WRT3_OFF_6L

    // Boot block (000000-0007FFh) write-protected
    // Configuration registers (300000-3000FFh) write-protected
    // Data EEPROM not write-protected
#pragma DATA _CONFIG6H, _WRTB_ON_6H & _WRTC_ON_6H & _WRTD_OFF_6H

    // Block 0 (000800-001FFFh) not protected from table reads executed in other blocks
    // Block 1 (002000-003FFFh) not protected from table reads executed in other blocks
    // Block 2 (004000-005FFFh) not protected from table reads executed in other blocks
    // Block 3 (006000-007FFFh) not protected from table reads executed in other blocks
#pragma DATA _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L & _EBTR2_OFF_7L & _EBTR3_OFF_7L

    // Boot block (000000-0007FFh) protected from table reads executed in other blocks
#pragma DATA _CONFIG7H, _EBTRB_ON_7H

http://www.sourceboost.com

Copyright © 2006 SourceBoost Technologies