![]() |
Forum Index : Microcontroller and PC projects : MM plus : Oscillator instead of an quartz ?
Author | Message | ||||
athlon1900 Regular Member ![]() Joined: 10/10/2019 Location: AustriaPosts: 49 |
Hello @ all ![]() Is it possible to use an 20Mhz oscillator on Pin OSC1 on an MM plus ? Pin OSC2 is then unused. Or does it have to be a quartz with 22pF capacitors on OCS1 and OSC2 ? Best regards, athlon1900 |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
I have not tried it but it is theoretically possible that it will work OK. If you do experiment with it please report back on how it worked in practice. Geoff Geoff Graham - http://geoffg.net |
||||
athlon1900 Regular Member ![]() Joined: 10/10/2019 Location: AustriaPosts: 49 |
Hi Geoff , thanks for your answer. I connected the oscillator to pin63 (OSC1 100pin MM+) and it works. ![]() Practical test is still running. But what I can say so far (approx 4 hours running time) : Measurement errors with the DS18b20 sensor have not occurred yet. ![]() An another 64pin MM+ with quartz already has 3 measurement errors in the short time. ![]() So I think an oscillator is much more stable than a crystal with capacitors. Perhaps the load capacity of a quartz should be set individually and not the standard value (22pF) should be used. I will swap the quartz on the mm+ 64pin to an oscillator and see what happens. athlon1900 |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
Thanks for the feedback. I am amazed that it has fixed your issues with the DS18b20 sensor. These devices have a wide timing tolerance and it is hard to see how a little clock jitter could have an effect. Geoff Geoff Graham - http://geoffg.net |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5089 |
I have been fighting a performance issue on a AM3352 design (Texas Instrumens ARM microprocessor). In the end the culprit was the crystal oscillator board layout. Because the board was small, the designed did put digital traces under the crystal itself. Through coupling of the edges on the digital lines the crystal was phase modulated, and the PLL's inside the AM3352 would not be stable. The solution was to: - move all digital traces away from the crystal oscillator (oscillator pins, crystal itself, the 2 capacitors) - provide good ground plane, directly coupled to the closest Vss pin, under the crystal and associated components. Oh, don't forget to check the loop gain on the oscillator. If the crystal specification says it has an internal resistance (ESR) of 25 ohm, you put 10x that value in series (250 ohm resistor), then the oscillator should still work. Anyway... a canned oscillator is simple, and doesn't cost much. Makes life so much simpler. Who makes yoghurt from milk these days...we all buy the finished product. PicomiteVGA PETSCII ROBOTS |
||||
LouisG Senior Member ![]() Joined: 19/03/2016 Location: AustraliaPosts: 129 |
@ athlon1900 Thank you for sharing your interesting experiment with us. I would never have suspected the crystal! @ Volhout Same to you for sharing your crystal problem and solution. Which makes me wonder ... Instead of connecting a 20MHz oscillator to OSC1, would it be possible to connect a 9kHz oscillator to OSC1 instead? This would allow the Micromite to avoid the need for EMC testing in a product. If a 40MHz clock allows execution of 30,000 lines of MMBasic per second, Then a 9kHz clock would allow about 6 lines/sec to excecute. This would be fine for controlling slow phenomena. Only arithmetic and logic operations needed. - |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5089 |
Dear LouisG, Nice thinking, using 9kHz, but that does not work... 1/ there are the authorities. In Europe you may be safe, but US demands you have an FCC label, that requires a test report from a certified lab. In other words you must test anyway. 2/ if you microprocessor was a pure sine wave chip, running on 8.999kHz you are fine. But it is typically the steep edges of the signal that cause the disturbance at EMC. Look at the spectrum of a 9kHz square wave with 1ns fast edges. The spectrum goes up to 350Mhz or so. 3/ In case the MMplus: there is a 20MHz crystal connected. But internals of the chip run at 120Mhz. How does it do that? It has a frequency multiplier inside, mostly consists of a PLL (phase locked loop) circuit and a VCO (voltage controlled oscillator). The 20MHz is used to "stabilize" the VCO running at 120MHz (or even 240MHz). Digital dividers are programmed to reach the 6x frequency multiplication. This is all done inside the chip. The VCO is the reason it does not work. These VCO's typically have a 2:1 ratio (so the minimum frequency is 80MHz, and the maximum frequency is 160MHz. And it is synchronized to run at 120MHz, right in the middle. It should be clear that when you attach a 9kHz crystal, and do not change the divider setting, the PLL cannot lock (6x 9kHz is lower than 80MHz), and therefore the chip will run at 80MHz. The lowest it can. (actually, the PLL will constantly search to find lock, and it will sweep through 80MHz...160MHz, making things even worse). You can get the chip to run at lower frequencies, but that is done by programming the dividers different. meaning the VCO will still work at 120MHz, but the cpu may run at 12MHz. Since the VCO and PLL run at 120MHz, you have your EMC problem anyway. And... as said above: EMC is not only in the frequency, but also in the fast edges of slow signal. This is especially obvious with power supplies, these switch at 40kHz or 100kHz (kHz not MHz) and are the major cause of EMC problems.... the edges !! Regards, Volhout PicomiteVGA PETSCII ROBOTS |
||||
athlon1900 Regular Member ![]() Joined: 10/10/2019 Location: AustriaPosts: 49 |
Practical test update: I changed the crystal on the mm+ 64pin to an oscillator. What i can say , the errors are gone , no measurement errors for 10 days. ![]() Memo to myself: In the future i will only use oscillators. These are a little more expensive, but clearly the better choice for hobbyists. ![]() Thanks to all athlon1900 |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |