Steve,
I've tried most of the suggestions to include the config settings within the code. The only enties that doesn't halt the compiling process are
Code:
@INTRC_OSC_NOCLKOUT
@WDT_ON
@PWRT_ON
@MCLR_OFF
@BOD_ON
@LVP_OFF
@CPD_OFF
@PROTECT_OFF
However these must me ignored by the compiler as the resulting LST file after the code has compiled shows a config setting of
Code:
__config _XT_OSC & _WDT_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF
So when I come squirt the HEX file to the PIC via WinPIC pro I manually change the device config settings to RC no clockout, and have tried enabling / disabling WDT and MCLR input as well but it has no affect, the PIC seems to freeze after 60-90 seconds of running the code posted above.
Just to prove it isn't the PIC that's faulty, I programmed a simple "Flash LEDs" using JAL and that's been running for the past hour - so the issue must be somthing with either the PBP code, the communications between PBP and MPSAM or the way MPSAM compiles the files from PBP or the manual settings in WinPIC are being overlooked when the HEX is loaded.. but then why would the code run at all if that was the case ??
On the hardware front, as I'm using the internal OSC (or trying to) I have no Resistors or capacitors, or external crystal. The four reed switches are connected between ground and the first four pins of PORTB, with 10K pull-ups to +5v. The only other components are 8 LEDs and their 8 resistors.
Cheers
Malcolm
Bookmarks