Hi Melanie,
I used to do it that way as well until reading the 16F mid-range ref
manual.
9.11 Initialization
It is recommended that when initializing the port, the data latch
(PORT register) should be initialized first, and then the data direction
(TRIS register). This will eliminate a possible pin glitch, since the PORT
data latch values power up in a random state.
Bookmarks