PIC 12 F 675 low power oscillator using 32,768kHz crystal
Hello guys,
I am using low power oscillator configuration on PIC12F675 MCU with 32,768kHz crystal.
My problem is that the program starts after approx. 12 sec from power supply switching on, what is too long time for me.
I am using 100pF capacitors on oscillator pins.
Does anybody have any idea to solve my problem please? Or is this starting time normal for this osc. type?
Have you looked at the oscillator pin OSC2 to see if a slow clock startup is genuinely the cause? You could try adding a resistor in series with OSC2. I am not sure if you are allowed to dynamically change the oscillator mode, but if so, maybe you could start in XT mode then switch (although I think the problem should be solvable without that). You could make C2 greater than C1 (C2 is on OSC2).
Are you sure, that the "program startup" delay is actually caused by the oscillator startup or do you have some initial code processed before? The processor is rather slow at 32 kHz clock frequency.
If it's actually an oscillator issue, I noticed that Microchip specified 68 - 100pF capacitors for LP oscillator, but it's far off usual manufacturer specifications for watch crystals. The crystal may be simply unable to achieve a sufficient Q with this load impedance.
Actually, if it was 32 point 768 MHz and the caps were 100pF it might oscillate eventually but if that is the Crystal frequency the values should be nearer 10pF. If it is a watch crystal at 32.768KHz, I find caps of around 47pF work best.
Please notice the term low power oscillator in the title, which effectively means 32 kHz with a PIC. Although it sounds strange, the datasheet suggests 68 to 100 pF for it with PIC12 devices. As I already mentioned, I fear it won't work with some watch crystals.
Hello, I changed caps to 47pF. It works better now. The start up time is up to 2 seconds.
Thanks to everybody, especially to betwixt.
But I am confused about the oscillator´s wave shape - I supposed the square wave but I have sinusoidal wave instead.
Is it normal for such frequency please?
One pin - the input osc1 - will be a sine. The output - osc2 - will be more like a square. 2 seconds is still longer than I would expect from an oscillator working correctly.