Quote Originally Posted by richard View Post
this will do it
Code:
ansela = ~ 16
lata     = ~ 16
trisa    = ~ 16
but i doubt its the actual problem, i suspect you are most likely driving the mosfet improperly

you are correct - with transistor out, it works - the transistor turns on the fet which has a load. With no load the code works - with load the program resets because the PIC output pin cant drive it on startup. Once its on and a load is then applied it works...

So I guess the question is how do I get the PIC to work with load already on.