Hi,
I have a circuit designed around a 16F676. Basically, I am feeding the mains sine wave (after the transformer, thru' a 22K resistor) to PortA.2. I did a pulsin to measure the width of the positive cycle, and got a reading of around 120 (12 ms).
Since I am feeding a sine wave, I dont expect to get a precise reading, as I realise the clipping would happen somewhere on the rising and falling edges. This would be allright. (Actually for 50 Hz, I would have expected the reading to be *less* than 100, or 10ms for a half cycle, but like I said I dont need absolute values)
But, the problem is this; the same signal fed to any other PortA pin gives a much higher value (175 or thereabouts).
I could of course shift the input to the other pin(s), but my PCB is designed.
What could be causing this? What is different about PortA.2 from say A.0,A.1 or A.5?
BTW, I have configured the PIC for all digital, comparators disabled and weak pullups disabled.
Any help would be appreciated!
Regards,
Anand