You mean the Oscillator setting in EPIC? It is set to INTRC.Originally Posted by Dave
I have tried both INTRC and INTRC (Clockout) and both give the same results. It must be something else I am not declaring in the startup of the code???
You mean the Oscillator setting in EPIC? It is set to INTRC.Originally Posted by Dave
I have tried both INTRC and INTRC (Clockout) and both give the same results. It must be something else I am not declaring in the startup of the code???
Your code is fine. Under the Options menu in the EPIC software, make sure you have Update Configuration & Reread File Before Programming checked.
These options force the EPIC software to load & use config fuse settings embedded in your code, and always open/use the latest version of your .hex file.
I do not have the stuff in front of me right now, but I do have the software installed here at work, and I just checked the default settings in EPIC and Update Configuration is checked by default, but Reread File Before Programming is not. However, if I were to close EPIC and recompile, then reload EPIC, wouldnt that do the same thing? Because thats what I was doing every time anyway.Originally Posted by Bruce
If your settings are the same at home, and it is loading & using config word settings in your .hex file, then i would have to suspect something in your circuit since your code posted as-is above works just fine.
Thanks for the verification...Originally Posted by Bruce
What is better to use, INTRC or INTRC (CLockout)? Does it make a diff?
My circuit is pretty simple, 5v to power, ground is good, and I have a 10k pullup attached to MCLR, although I believe I am disabling it in the header statement anyway??
What more should/could there be in the circuit?
With these settings @ DEVICE INTRC_OSC, LVP_OFF, WDT_OFF, MCLR_OFF you won't need much more than power. Assuming these config word settings are actually being programmed into the PIC as expected.
MCLR_OFF just disables the reset function on the /MCLR pin allowing it to be used for an input VS external reset.
You might also want to include the decoupling cap as shown in your PBP manual between Vcc and ground. Locate this cap as close to the PIC power pins as possible. Without it you can sometimes waste a ton of time chasing problems. Especially on "A" version PICs. These are more succeptible to noise than older non "A" revs.
As for clockout VS no clockout, that really depends on you. All this does is output the clock/4 on OSC2. If you want the OSC2 pin for I/O, then obviously you're better off with no clockout.
If you're curious about what these osc config options are, just look in your data sheet at the Special Features of the CPU section under CONFIGURATION WORD.
Last edited by Bruce; - 23rd January 2006 at 19:30.
Thanks Bruce, great info..I should be able to troubleshoot a little better now...I will report back with what the problem was as soon as I figure it out later...
Bookmarks