Author Topic: CRYSTAL NOT CONNECTED BUT PIC STILL RUNS.  (Read 1474 times)

0 Members and 1 Guest are viewing this topic.

Offline neko efecktzTopic starter

  • Regular Contributor
  • *
  • Posts: 153
  • Country: au
CRYSTAL NOT CONNECTED BUT PIC STILL RUNS.
« on: July 05, 2016, 02:02:21 am »
I am working on a pic project using PIC16F877A driving a LCD display 2 x 16.
The project is at the moment on a breadboard and the pic takes up more than its share of  holes to plug other components into.
My breadboard is two 65 column boards joined and mounted on a piece on MDF.
There wasn't much room for the crystal to fit right next to the chip so I fitted it onto the second board with  wires about 100mm long.
I was experimenting with different frequency crystals and on one occasion accidentally plugged the crystal into an adjoining set of holes.
The display came on as normal and worked fine.
I only noticed my mistake when I went to try another crystal.
The crystal was correctly terminated to OSC1
Out of curiosity I moved the wire to the next set of holes out and it still worked up to 4 rows of holes away although it took a little longer for the chip to start about 0.5 second longer.
I then tried reversing things. OSC2 connected and OSC1 in error.
This time it only worked to 3 holes away
This would have to be capacitance coupling between the rows of holes.
I then decided to try using a gimmick of about 50mm long with a gap of 6 rows. This also worked.
I cut it in half and it stiil works.
I cut it down until there was only one twist, approx 8mm,  in the wire still ok.
Unfortunately I only have a multimeter to measure capacitance  not good enough I'm afraid.
 
GIMMICK.
This dates back to the vacuum tube days. When a very small value of capacitance was needed in a circuit, usually at very high frequencies (30-50-200 MHz.), two pieces of insulated wire were connected to the two points where the capacitor was needed. Then, the two wires were twisted together, in a double helix DNA-like shape, until the desired effect was achieved. The more 'wraps' or turns, the more capacitance it had.


I have had other projects just not behaving as expected or getting the right results on the breadboard but having to  make component value changes once built up on PCD or Veroboard.

I remember Dave Jones doing a video on breadboard capacitances.
Might be worth another look at.

he measured about 2pF to 2.5pF per track

https://youtu.be/6GIscUsnlM0


It may be worth looking into some time.
« Last Edit: July 05, 2016, 03:51:32 am by neko efecktz »
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: CRYSTAL NOT CONNECTED BUT PIC STILL RUNS.
« Reply #1 on: July 05, 2016, 04:27:44 am »
Some microcontrollers will self-oscillate for a clock if no external reference, crystal, resonator or R/C circuit are provided.
That particular microcontroller appears to have EIGHT different oscillator modes. Do you know WHICH mode it is configured for?

Ref: http://ww1.microchip.com/downloads/en/DeviceDoc/31002a.pdf
 

Offline neko efecktzTopic starter

  • Regular Contributor
  • *
  • Posts: 153
  • Country: au
Re: CRYSTAL NOT CONNECTED BUT PIC STILL RUNS.
« Reply #2 on: July 05, 2016, 03:33:05 pm »
Gidday Richard
Thankyou for the link to the oscillator help sheet.
i'll have a look in the morning.
just got home from work 1:15 in the morning here.
You asked about the mode the oscillator was running.
It is configured for FOSC = HS.
I'm just a newbie to micro controllers so i have a lot to learn but there a a lot of good blokes on this and other blogs that are willing to give advice.
I hope to be able to do the same as I get more into pics.

Anyway the floating crystal was an interesting diversion from my project.
But it goes to show that breadboards can cause problems in the right situation.
Did you watch the video by David.
i have a couple of breadboards mounted on 3mm alloy plates that have always caused problems.

Must go to bed now.
Thank you once again for the ocsillator book.
good night
Bill.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf