My supply voltage lines are clean to the PIC and I have a .1uf cap sitting next to the Vcc pin. The board I am working with is a board I had built by PCBExpress so the crystal and other components are not mounted on a breadboard. My total current useage for all componenents on the board is less than 30mA.

Some background...
A month ago I built a board using an 16f876. PortB Pins1 & 2 were used for communicating with an AT45 memory chip using ShiftIn and ShiftOut. My memory would sporadically lose data I was sending to it. It didn't happen all the time. It was one of the horrible random things that would occasionally happen. I spent weeks going through the code and electronics trying to narrow the problem down. I finally gave up and redid the board. Now I am having trouble with the same pins which in this version are being used to simply turn on and off power to some components. The memory is working fine in this version. When I add two and two together the culprit seems to be these two pins... all the others work fine.

In any event, I will try out the TRISB method tonight and post the results.

Kind Regards,
Eric Berg