osc1=input
osc2=output
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
Third:Code:ADCON1=7 CMCON=7
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
Dave
Always wear safety glasses while programming.
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....
___________________
WHY things get boring when they work just fine?
Tell about the MCLR pin connection.
Is it pulled high?
Dave
Always wear safety glasses while programming.
10 Bucks on Mackrackit ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Did I mentioned that some people here really know there stuff?
Thank you very much, this problem was due to MCLR!
But
I'LL BE BACK (with more problems ofcourse)
![]()
___________________
WHY things get boring when they work just fine?
Bookmarks