I usually use meCONFIG.exe just because it's so much faster when I'm writing code and it has the chips in it I use. Here is the long form of the same file. The weird thing is that this program was working just fine. And playing around with HSERIN with and interrupt routine is what messed things up. I had the interrupt working fine and just change a little bit of code and then it stopped working. I've tried the original code without interrupt that's been working for a month just fine and it won't run portb.5 now. Could something have gotten screwed up with the programming software? I"m using the melabs U2 USB programmer. It's just odd, nothing was hooked to the pin but my scope.
Code:;----[18F4431 Hardware Configuration]------------------------------------------- #IF __PROCESSOR__ = "18F4431" #DEFINE MCU_FOUND 1 #CONFIG CONFIG OSC = XT ; XT oscillator CONFIG FCMEN = ON ; Fail-Safe Clock Monitor enabled CONFIG IESO = ON ; Internal External Switchover mode enabled CONFIG PWRTEN = OFF ; PWRT disabled CONFIG BOREN = ON ; Brown-out Reset enabled CONFIG BORV = 20 ; Reserved CONFIG WDTEN = ON ; WDT enabled CONFIG WDPS = 512 ; 1:512 CONFIG WINEN = OFF ; WDT window disabled CONFIG PWMPIN = OFF ; PWM outputs disabled upon Reset (default) CONFIG LPOL = HIGH ; PWM0, 2, 4 and 6 are active-high CONFIG HPOL = HIGH ; PWM1, 3, 5 and 7 are active-high CONFIG T1OSCMX = ON ; Low-power Timer1 operation when microcontroller is in Sleep mode CONFIG FLTAMX = RC1 ; FLTA input is multiplexed with RC1 CONFIG SSPMX = RC7 ; SCK/SCL clocks and SDA/SDI data are multiplexed with RC5 and RC4, respectively. SDO output is multiplexed with RC7. CONFIG PWM4MX = RB5 ; PWM4 output is multiplexed with RB5 CONFIG EXCLKMX = RC3 ; TMR0/T5CKI external clock input is multiplexed with RC3 CONFIG MCLRE = ON ; Enabled CONFIG STVREN = ON ; Stack full/underflow will cause Reset CONFIG LVP = OFF ; Low-voltage ICSP disabled CONFIG DEBUG = OFF ; Background debugger disabled; RB6 and RB7 configured as general purpose I/O pins CONFIG CP0 = OFF ; Block 0 (000200-000FFFh) not code-protected CONFIG CP1 = OFF ; Block 1 (001000-001FFF) not code-protected CONFIG CP2 = OFF ; Block 2 (002000-002FFFh) not code-protected CONFIG CP3 = OFF ; Block 3 (003000-003FFFh) not code-protected CONFIG CPB = OFF ; Boot Block (000000-0001FFh) not code-protected CONFIG CPD = OFF ; Data EEPROM not code-protected CONFIG WRT0 = OFF ; Block 0 (000200-000FFFh) not write-protected CONFIG WRT1 = OFF ; Block 1 (001000-001FFF) not write-protected CONFIG WRT2 = OFF ; Block 2 (002000-002FFFh) not write-protected CONFIG WRT3 = OFF ; Block 3 (003000-003FFFh) not write-protected CONFIG WRTC = OFF ; Configuration registers (300000-3000FFh) not write-protected CONFIG WRTB = OFF ; Boot Block (000000-0001FFh) not write-protected CONFIG WRTD = OFF ; Data EEPROM not write-protected CONFIG EBTR0 = OFF ; Block 0 (000200-000FFFh) not protected from table reads executed in other blocks CONFIG EBTR1 = OFF ; Block 1 (001000-001FFF) not protected from table reads executed in other blocks CONFIG EBTR2 = OFF ; Block 2 (002000-002FFFh) not protected from table reads executed in other blocks CONFIG EBTR3 = OFF ; Block 3 (003000-003FFFh) not protected from table reads executed in other blocks CONFIG EBTRB = OFF ; Boot Block (000000-0001FFh) not protected from table reads executed in other blocks #ENDCONFIG #ENDIF ;----[Verify Configs have been specified for Selected Processor]---------------- ; Note: Only include this routine once, after all #CONFIG blocks #IFNDEF MCU_FOUND #ERROR "No CONFIGs found for [" + __PROCESSOR__ +"]" #ENDIF




Bookmarks