External clock problems

Status
Not open for further replies.

erospawn

New Member
Hi,

I'm a newbie here.. I've written a few programs that all work great with the internal clock set at whatever I set it too .. ie 32Khz - 4Mhz.. However, I have yet to get the external clock to even work properly.


The code Im using in my program is :

__config _INTRC_OSC_NOCLKOUT & _BODEN_OFF & _WDT_OFF & _PWRTE_ON & _MCLRE_ON & _CP_OFF & _CP_OFF

I have a book, Pic In Practice, that shows __CONFIG H'3ff0'.. However Mplabs compiler doesn't like this at all..

I've gone into the configuration bits drop down and unchecked it, changed to LP, XT and external clock and nothing works. Im using a 4Mhz LP crystal in Pins 1 and 2 of a 16F630 and using 2 68pf ceramic capacitors off each pin?? AM I missing something here?
 
Open the "inf" file in the editor window for your particular PIC and look near the bottom of the file for the config fuse settings. You need to replace the "_INTRC_OSC_NOCLKOUT" setting in your __config line with something similar to "_EXT_OSC_HS".

Regards, Mike
 
Wow... I have been monkeying around with the external clock thing for several days... I tried all the settings except that one! It works now. Thanks!
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…