On 22/08/2005, at 10:40 AM, Michael Rigby-Jones wrote: > No problem, it looks like you have pin 4 configured as the MCLR > (reset) pin. This means you absolutely need a pullup to Vdd. The > consequences of not having a pullup are exactly as you describe, i.e. > flaky, intermittant operation, affected by bringing a finger near. That was exactly the problem. I misread the data sheet and thought reset was internal by default. Tieing this pin to +ve or adding _MCLRE_OFF to my _config line fixed my booting problem. Thanks to everyone for their help - I'm sure I would have been staring at it for a long time without it. I have just got everything working on my breadboard and thought I'd share with you the things that took me longest to work out, for the benefit of the archives or for the benefit of anyone thinking of writing a book for newbies :-) 1) The external/internal reset issue that was the subject of this thread 2) The analogue comparator is on by default and must be switched off before GP0 and GP1 are available 3) Most instructions don't seem to work with a "special" register as their target e.g. andwf CMCON, F doesn't affect CMCON (at least in the MPLAB sim) You have to do your bit manipulation in W and then movwf the completed value to the register in question. Incidentally thats how I assumed it would have to be done before I read the data sheet. Something in the data sheet (what I'm no longer sure) that gave me the impression I didn't need to do it that way. I remember thinking it was pretty cool you could use any register. Thanks again to everyone for their help! Andrew -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist