Just to clear this up I am using all decoupling that is needed and I am not using the watchdog timer (the fuse is programmed to this effect). I know that porta and porte default to anologue inputs but when set as outputs does this matter and would it affect other ports? The device is not a 74A. I have had some success with more complex programs on the device since, however, but the simplest programs don't seem to work still. It could be one of the other registers - mplab is not perfect. Thanks for all the replys Tim