Hi All,

Just thought I would post a reminder of something to check!

Last night I had typed a new thread pleading for help with getting RA4 to be a digital out on a 16F88.

The pin is designated RA4/AN4/TOCKI/C2OUT

I had included ANSEL=0 to get rid of AN4

I had included CMCON=7 to disable the comparators

My TRISA bits were set correctly and I was sure that the registers for TMR0 were OK but no matter what I tried I couldnt get RA4 to function as a digital out.

Following Melanie's Law I read the datasheet time and time again and the only bit that I wasnt sure about was 13.5 which says....

"The comparator outputs may also be directly output to the RA3 and RA4 I/O pins. When enabled, multiplexors in the output path of the RA3 and RA4 pins will switch and the output of each pin will be the unsynchronized output of the comparator."

... but I couldnt see anything that explicity enabled the multiplexors.

I tried using RA3 as a digital output and that worked so I was pretty sure that my code was OK but it just wouldnt work

I was just about to hit the "Submit New Thread" button when I decided to try another 16F88. SUCCESS

I had spent the best part of two evenings trying to get a circuit working without checking that the chip was OK. I dont know how I had killed it but it had definately gone to that great breadboard in the sky.

Sometimes you just get so focused on the code you are writing that you assume that is where the problem lies but it can be a lot more basic than that!!!

DOH !!!!