1) 16F876A has no internal OSC
2) your program work... even if he will fall in a under-stack event soon.
3) your ADC/Comparator settings are OK
4) external OSC is needed if you need timing accuracy. Internal OSC are nice, but shift with temperature, humidity, gas price, CAN$-USD$-CAN$ currency, wind direction etc etc. For most jobs they're nice enough and give 2 free i/o.
HTH
Bookmarks