Hi,
You will always have random OUTPUT state at power on ...
So, just Write
GPIO = % xxxxxxxx
BEFORE setting your Tris Register ...
and do not forget your inputs will be floating for some ms at startup ( hardware pull up or down resistors to place, i.e. when driving Mosfets ...)
Alain
EDIT : +1 with Sinoteq, then !!!
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks