If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
The secret behind an external crystal oscillator is as follows:
- short and long term stability
- very high Q (resonant Q)
- good temperature coefficient
- low noise
RC oscillators have/are:
- much lower Q
- overall high noise
- inaccurate
- high temp. coefficient (resistor and capacitor on the chip varies)
- high resistor thermal noise (causing phase noises -> jitter and freq. instability)
- capacitor noise
The internal oscillator adjusting registers are only to adjust to a defined frequency and they do not improve the stability and temp. coefficient. This brings nothing and you can forget such registers. Except, you want just have exact 4.000000 MHz instead of 3.999374 MHz.
Avoid internal oscillators in PI designs!
Aziz
Here are the Oscillator recommendations from Microchip:
As you say, you are averaging a bunch of readings, so the jitter gets averaged. But if you are concerned as to what effects are left, or as to what level of jitter is tolerable, then it's time for a simple lab experiment. Just compare the results from the internal oscillator to the results from a crystal, everything else equal. I suspect that even the internal oscillator is "good enough".
- Carl
Thanks,
So I will try the PIC16F690 with the internal 8MHz oscillator. The timing itself works fine with the demo board in its original configuration of 4MHz.
Later we can look for a more powerful MCU that runs faster.
Tinkerer
Thanks,
I prefer the 690 anyway, since I have a demo board with it. These datasheets do carry a lot of information, but my memory is so short that I don't remember the beginning when I reach the end.
I average 100 readings to eliminate this noise.
Can somebody suggest a better method?
As you say, you are averaging a bunch of readings, so the jitter gets averaged. But if you are concerned as to what effects are left, or as to what level of jitter is tolerable, then it's time for a simple lab experiment. Just compare the results from the internal oscillator to the results from a crystal, everything else equal. I suspect that even the internal oscillator is "good enough".
Originally posted by Götz von BerlichingenView Post
I dont know the perfect solution for low-noise A/D, but i have 2 hints :
1. The internal Oscillator can be tuned with the OSCTUNE Register.
2. The A/D Converter can be used in SLEEP Mode and trigger an
Interrupt to wake the PIC up when finished. A/D clock source must be FRC.
This will reduce switching noise from the PIC itself.
About the internal Oscillator, see the Data Sheet Page 242.
Which datasheet is that? The datasheet of the 877A has only 234 pages.
The secret behind an external crystal oscillator is as follows:
- short and long term stability
- very high Q (resonant Q)
- good temperature coefficient
- low noise
RC oscillators have/are:
- much lower Q
- overall high noise
- inaccurate
- high temp. coefficient (resistor and capacitor on the chip varies)
- high resistor thermal noise (causing phase noises -> jitter and freq. instability)
- capacitor noise
The internal oscillator adjusting registers are only to adjust to a defined frequency and they do not improve the stability and temp. coefficient. This brings nothing and you can forget such registers. Except, you want just have exact 4.000000 MHz instead of 3.999374 MHz.
I dont know the perfect solution for low-noise A/D, but i have 2 hints :
1. The internal Oscillator can be tuned with the OSCTUNE Register.
2. The A/D Converter can be used in SLEEP Mode and trigger an
Interrupt to wake the PIC up when finished. A/D clock source must be FRC.
This will reduce switching noise from the PIC itself.
About the internal Oscillator, see the Data Sheet Page 242.
Hi,
the jitter is a problem when using internal oscillator stuff. There are instructions for reducing that jitter in AVR (I don't remember that about PICs but think there are too)... but to have an accurate timing you must use external xtal or clock.
The jitter you have on external crystal is very small and related to quality of crystal itself... so you can do e.g. clocks with them with same accurancy of digital quartz clocks and the like.
Usual crystals have -+30ppm maximum deviation on their operating temperature range... so they are good enough for many applications.
Kind regards,
Max
Thank you for the useful information.
for the timing of my discriminating PI, an accuracy of a few hundred Nano seconds is good enough.
However, jitter in the sample timing translates to noise.
How much noise?
Lets look at the signal amplitude.
A Nickle gives me about 3mV signal when at a distance of 12" from the coil. This 3mV is after an amplification of 8000.
So if we divide 3mV by 8000 we have a signal of 375 Nano volt at the input of the preamplifier.
Jitter in the timing window can produce a few Nano Volt variation from one reading to the other. So it is significant.
I average 100 readings to eliminate this noise.
Can somebody suggest a better method?
I finally got my PIC timing Schedule working the way I want it. I have been using the internal clock at 4MHz until now since I don’t need any pulse of less than 5us.
Now, looking at processing the signal and many other controlling tasks, I realize that I have to use a faster clock speed. Probably the internal clock at 8Mhz would be fast enough for my restricted use.
On another forum, Aziz warned about using the internal clock because of its inaccuracies.
So comes the question how much jitter does the internal 8Mhz clock of the PIC 16F690 have?
How much jitter can I expect from an external crystal clock of 10 or 20Mhz?
Tinkerer
Hi,
the jitter is a problem when using internal oscillator stuff. There are instructions for reducing that jitter in AVR (I don't remember that about PICs but think there are too)... but to have an accurate timing you must use external xtal or clock.
The jitter you have on external crystal is very small and related to quality of crystal itself... so you can do e.g. clocks with them with same accurancy of digital quartz clocks and the like.
Usual crystals have -+30ppm maximum deviation on their operating temperature range... so they are good enough for many applications.
I finally got my PIC timing Schedule working the way I want it. I have been using the internal clock at 4MHz until now since I don’t need any pulse of less than 5us.
Now, looking at processing the signal and many other controlling tasks, I realize that I have to use a faster clock speed. Probably the internal clock at 8Mhz would be fast enough for my restricted use.
On another forum, Aziz warned about using the internal clock because of its inaccuracies.
So comes the question how much jitter does the internal 8Mhz clock of the PIC 16F690 have?
How much jitter can I expect from an external crystal clock of 10 or 20Mhz?
Tinkerer
Leave a comment: