'************************ '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 ' 16MHz Xtal * 4 PLL Symbol PWMminF = 3906 ' lowest possible pwm frequency. ' configuration for 18F25K20: ' This config block is essential as well as veru critical for the functionality of the 'application. This version is for the Simba Hub board with 32 bit periodic timers. (Pic1) 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 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 WDTEN = Off 'this is crucial if we want to avoid crashes and resets every 2 minutes... WDTPS = 128 ' Watchdog oscillator prescaler 1:128 , Johannes had it = 1 . Must be set! 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 = 18 ' 18 = VBOR set to 1.8 V nominal - to be changed for 5V devices *********************** MCLRE = off 'On ' MCLR pin enabled, RE3 input pin disabled LPT1OSC = Off ' 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 = Off ' 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 PWRT = On ' Power up timer enabled/ disabled Config_End