2

I'm using pic18 with external oscillator 16MHZ 16M HZ HC-49S Crystal Oscillator with two 30PF capacitors

configuration OSC = HS

using breadboard, when wiring the capacitors to ground the pic stop working, but when letting them in open circuit (just wire one side to PIC, other side stay open) the PIC work again.

but when removing the capacitors from the circuit, the PIC also not working

what explanation for this

bouqbouq
  • 583
  • 8
  • 27
  • 1
    There is probably enough picofarads in the breadboard to make it work, but when you add an extra 30pF it becomes too high a load? – KyranF Oct 29 '14 at 07:06
  • @KyranF can the breadboard behave like a capacitor???? – bouqbouq Oct 29 '14 at 07:08
  • 4
    Yes, indeed. with Picofarad magnitude! The pins in the breadboard capacitively couple to nearby pins. You really should not try to use 16MHz signals on a breadboard, it will hardly work even if you think it is. – KyranF Oct 29 '14 at 07:14
  • 1
    Good old Dave Jones (a fellow Aussie!!) talks about it in his video maybe that will help you understand it: http://youtu.be/6GIscUsnlM0 – KyranF Oct 29 '14 at 07:15
  • 2
    Yes, those white solderless breadboards have a significant amount of capacitance and inductance... more than a PCB. – MarkU Oct 29 '14 at 07:15
  • @KyranF thanks a lot, by watching the video I can understand better – bouqbouq Oct 29 '14 at 07:35
  • It would help if you [read this question](http://electronics.stackexchange.com/questions/36308/crystals-oscillators-and-resonators-what-the-difference) and updated yours to say whether it is a crystal or resonator. – David Oct 29 '14 at 07:53
  • so in conclusion, go for 18pF capacitors or even less, and it may work better. – KyranF Oct 29 '14 at 07:53
  • @David the HC-49S is a Quartz crystal, I believe. – KyranF Oct 29 '14 at 07:56
  • @KyranF I don't want to edit the question and change what the author means unless I'm sure. – David Oct 29 '14 at 10:02
  • Which pic18 are you using? – aja Oct 29 '14 at 10:56
  • @aja PIC18F4550 – bouqbouq Oct 29 '14 at 11:26

1 Answers1

1

30pF seems a bit high. The datasheet states that for 20MHz (which is near your 16MHz) capacitors of 15pF are advised. Furthermore the (paracitic) capacitance of your breadboard is probably also pretty large (in the order of some pF).

So I suggest to try 15pF, or maybe even 12pF or so.

Douwe66
  • 1,696
  • 10
  • 14