Maker Pro
Maker Pro

Using external xtal osc with a PIC

I want to use a 20MHz crystal module as an oscillator fed into GPIO 5 of a PIC 12F629.
Does that still tie up GPIO 4 pin as the OSC out pin, or can I use it as an input?
 
Thanks, M.
I haven't got a manual, as such. But looking at Microchip 33023A.PDF section 27.1, I cannot see a reference to EC. How would I describe it in the config file?
Sorry for my ignorance but in the past I have only used the internal RC oscillator.
 
The best place to look for these in in the include file for the processor found at:

"Program Files (x86)\Microchip\MPASM suite"\p12f629.inc"

You will see this line:

_FOSC_EC EQU H'3FFB' ; EC: I/O function on GP4/OSC2/CLKOUT pin, CLKIN on GP5/OSC1/CLKIN
 
See or Down load manual DS41190G see p54 CONFIG register.
You should have a header in your file setting the Config bits.
M.
 
Thanks to you both. It's so much easier when you know just where to look:)
Just to confirm, do I use _FOSC_EC ?
 
Top