On the pic71 I want to use an external clock to increment the RTCC. Logic says that you set the RTCC pin as an input, tell the pic that the RTCC signal source is on RA4 and hey presto it's supposed to work. Well this had me baffeled for around two weeks because it did'nt work. I could see because at every count of 50 a led was to be turned on and off. The external clock was from an opto isolator, being pulled up with a 4.7k resistor. When the pic was run the RA4 pin was pulling the opto output to ground. OK thought I, lets do the opposite. Looking at the block diagram of the RA4 pin as shown in the PIC16C71 data sheet ( page 25).I set the pin as an output and then sent a '1' to that pin, guess what, that led started flashing. The only way I could get an external clock to the RTCC was to set the pin as an output (not an input ) and then write a '1' to disable the open collector output transistor. O.K so I thought I had it sussed. But no, it would'nt work on mpsim. I was originaly using ver 3.* and applying a simulas file, but it would'nt simulate an external clock on the simulator. Then I got mpsim ver 5.0, It lets you apply a clock to any pin with a predefined mark space ratio. Did it simulate my external clock. No it just sat there and didnt change. Ok said I lets reset that RA4 pin as an input for the simulator, and yes it worked. Have I got something wrong, I can get it to work on the pic but not on the simulator, or I can get it to work on the simulator but not on the pic. I could remember and change the option register for simulation and then (if I don't forget) change it back before I program the pic BUT.....! IS THERE ANOTHER WAY OF DOING IT.......?I've seen things you people would'nt believe, Attack ships on fire of the shores of Orion, I watched sea beams,glitter in the darkness at ten houser gate, All these moments will be lost, In time, like tears in the rain Remember now, watch out for the Fairies......!