>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. One problem I encountered (my own fault) was to set portE as all inputs by putting the value b'11111111' in the TRISE register. This sets PORTD in slave port mode. I should have written b'00000111' instead. Make sure prescaler is assigned to TMR0 and not the WDT Check page bits in STATUS Are your addresses in your 'Equates' list ok, eg portA equ 5h, etc. If you are using BSF, BCF instructions on the ports, try using MOVWF (Value) instead. If a port bit is configured for analog input but that bit is being used as a digital output, a read modify write instruction (eg. BSF - BCF) on another bit will set the analog output = LOW. Tony Just when I thought I knew it all, I learned that I didn't.