Thanks Dave, yes the MCLRE was the magic missing ingredient. I thought I'd done that last night but noooo....
I did look in the P18F1220.INC and followed it's advice. It actually says this, and shows the word 'Important' in loud capitals...
;================================================= =========================
;
; IMPORTANT: For the PIC18 devices, the __CONFIG directive has been
; superseded by the CONFIG directive. The following settings
; are available for this device.
;
; Oscillator Selection:
; OSC = LP LP Oscillator
; OSC = XT XT Oscillator
; OSC = HS HS Oscillator
etc etc for about 50 lines of Config choices.
I added this to get my PIC alive.
'Config3H register
@ CONFIG MCLRE=OFF
'Reset pin disabled
It works fine for me, no PBP compile errors, so is it really the wrong way to write the configs ?
I have a new issue though, I sped up the INT OSC to 8Mhz with the OSCCON and set 'Define Osc 8' to match, but the code is executing now twice as fast as it should, like the Define Osc 8 is not being used by PBP. Can that happen for some reason ?




Bookmarks