Quote Originally Posted by mackrackit View Post
Using MPLAB, GOOD!

First:
Turn off the setting of the fuses in your programmer software and do it in code or the *.inc file.

Second:
To make this all digital use
Code:
ADCON1=7
CMCON=7
Third:
Try this code before you write something "looooong", just to make sure everything is working.
Code:
'****************************************************************
'16F877A       HEART_BEAT
    DEFINE OSC 4
'####################
    @ __config _XT_OSC & _WDT_OFF & _LVP_OFF & _CP_OFF &_BODEN_OFF
    ADCON1=7
    CMCON=7
    
START:
    HIGH PORTD.2
    PAUSE 100
    LOW PORTD.2
    PAUSE 100
    GOTO START
Hi, thanks for replying. My Loooong code is working fine (Code is good) on 16F690. I want to transffer the code to 16F877 but since it uses external oscillator and I have never used one before, I only have intentions to blink an LED first.
I have tried your advise above but its not working still. Timing of blinking is not right (when it is blinking), it blinks sometimes when I touch the capacitor leg, touch the bench where the circuit is left on, sometimes its just sitting bright on. I feel the problem is with hardware configuration.
I am building the circuit on a breadboard with 4MHz ceramic oscillator and two 22pF ceramic capacitors. But just don't know what is wrong and it is taking me towards insanity....