'************************ 'Header file for 18F25K20 '************************ Device = 18F25K20 $define _Proton Optimiser_Level = 3 ' Full optimisation Declare Dead_Code_Remove = On '/Off 'Declare Icd_Req = 1 ' to allow ICD programming and PICkit2 ' params: On or Off, or True or False, or 1, 0 ' note that the ICD uses pins RB5, RB6, RB7 Declare Create_Coff = 1 ' generate a .COF file for the debugger in MPLAB Declare Xtal = 64 ' 40 ' 10MHz Xtal * 4 PLL ' configuration for 18F25K20: ' This config block is essential Config_Start Debug = Off ' Background debugger disabled; RB6/RB7 configured as I/O XINST = Off ' Instruction set extension mode disabled (only required for improved float support] STVREN = Off 'On ' Reset on stack overflow/underflow disabled or enabled FCMEN = Off ' was Off, changed by gwr. ' Fail-Safe Clock Monitor disabled - makes no apparent difference ' Johannes had it OFF ' OSC = HSPLL ' 18F2525, copied from asm code, 4x Xtal freq.. FOSC = HSPLL ' HS oscillator, PLL enabled and under software control. 4x x-tal frequency - not applicable to 18F2525 IESO = Off ' Two-Speed Start-up disabled ' WDT = OFF 'WDTPS = 128 ' Watchdog oscillator prescaler 1:128 , Johannes had it = 1 BOREN = Off 'SBORDIS ' was off, changed to on by gwr ' off= Brown-out Reset disabled in hardware and software 'Johannes had it set to ON 'BORV = 27 ' 18 = VBOR set to 1.8 V nominal - to be changed for 5V devices *********************** MCLRE = On ' MCLR pin enabled, RE3 input pin disabled LPT1OSC = On ' Timer1 operates in standard power mode , Johannes had it ON PBADEN = Off ' PORTB<4:0> pins are configured as digital I/O on Reset CCP2MX = PORTC ' CCP2 input/output is multiplexed with RC1 LVP = On ' Single-Supply ICSP enabled/disabled , Johannes had it Off CP0 = Off ' Block 0 (000800-001FFFh) not code-protected CP1 = Off ' Block 1 (002000-003FFFh) not code-protected CPB = Off ' Boot block (000000-0007FFh) not code-protected CPD = Off ' Data EEPROM not code-protected WRT0 = Off ' Block 0 (000800-001FFFh) not write-protected WRT1 = Off ' Block 1 (002000-003FFFh) not write-protected WRTB = Off ' Boot block (000000-0007FFh) not write-protected WRTC = Off ' Config registers (300000-3000FFh) not write-protected WRTD = Off ' Data EEPROM not write-protected EBTR0 = Off ' Block 0 (000800-001FFFh) not protected from table reads ' executed in other blocks EBTR1 = Off ' Block 1 (002000-003FFFh) not protected from table reads ' executed in other blocks EBTRB = Off ' Boot block (000000-0007FFh) not protected from reads ' executed in other blocks 'BORV = 2 ' copied from Johannes 'PWRT = OFF ' copied from Johannes Config_End