EMRFD Message Archive 3542

Message Date From Subject
3542 2009-09-14 05:00:04 hanssummers2000 Microcontroller clock frequency
Hello all

I am pondering the selection of a system clock frequency to use with a microcontroller in a high performance homebrew receiver. The receiver is a single-conversion superhet with 9MHz IF. So now I have to decide what to do about clocking the ATmega2561 microcontroller. What is the best clock frequency to use, to avoid digital noise getting into the receiver? You can take good shielding and decoupling as given, in either case...

Option 1: Use 16MHz clock which is the maximum the ATmega2561 will allow. This would give highest possible clock frequency and therefore some safety margin that would help me worry less about the processor running out of cycles to look after everything.

Option 2: Use the 9Mhz BFO to clock the microcontroller as system clock at 9MHz. Would this be an advantage or a disadvantage? One could argue that since the microcontroller would be clocked synchronously with the IF, there would be no opportunity at all for birdies. On the other hand, you might argue that the digital noise from the microcontroller would manifest itself as phase noise around a 9MHz carrier, which is the worst possible place for it since most of the gain of the system is also at 9MHz.

As I said, good shielding and decoupling is assured, either way!

Any comments and suggestions would be most welcome

73 Hans G0UPL
http://www.hanssummers.com
3543 2009-09-14 05:57:13 John Levreault Re: Microcontroller clock frequency
Hello, Hans.

I had a similar problem with a high-power Class-D audio amplifier, which
used an ATMega324P for monitoring and control. In the design's first
iteration, I clocked the AVR with an 8MHz crystal. I divided this clock
down internally to 250kHz, which drove an external level-shifter to
clock the PWM modulator in the amp. Unfortunately, the noise out of the
amp was very high.

After much experimentation, I devised a dual-use clock. I started with a
CD4060 (on a 12V supply!) with an 8MHz crystal connected to its
oscillator pins, CLK and /OSC. I took the 250kHz signal from the Q5
output and used that to clock the PWM modulator. I took the 8MHz signal
from the OSC pin and drove an opto-coupler, whose output drove the XTAL1
input on the AVR. I was unable to distinguish this clocking technique
from separate oscillators driving both the PWM mod and the AVR.

FWIW, I did try it the other way, too: I connected the crystal to the
AVR and then opto-coupled the 8MHz signal on XTAL2, after buffering, to
the 4060, where it was further divided down to drive the PWM mod.
However, this was only an incremental improvement over the original
technique. I concluded that the microprocessor "activity" was creating
noise and jitter, which really messed up the amp. With the final design,
the amp had a very clean clock, and the opto provided additional noise
isolation from the AVR.

So I suspect your Option 2 will prove the better option. Buffer it well,
just as you would to drive, for example, a frequency counter, and use
this signal to clock the micro. I hope you find my experience helpful.

73 de John, NB1I

hanssummers2000 wrote:
> Hello all
>
> I am pondering the selection of a system clock frequency to use with a microcontroller in a high performance homebrew receiver. The receiver is a single-conversion superhet with 9MHz IF. So now I have to decide what to do about clocking the ATmega2561 microcontroller. What is the best clock frequency to use, to avoid digital noise getting into the receiver? You can take good shielding and decoupling as given, in either case...
>
> Option 1: Use 16MHz clock which is the maximum the ATmega2561 will allow. This would give highest possible clock frequency and therefore some safety margin that would help me worry less about the processor running out of cycles to look after everything.
>
> Option 2: Use the 9Mhz BFO to clock the microcontroller as system clock at 9MHz. Would this be an advantage or a disadvantage? One could argue that since the microcontroller would be clocked synchronously with the IF, there would be no opportunity at all for birdies. On the other hand, you might argue that the digital noise from the microcontroller would manifest itself as phase noise around a 9MHz carrier, which is the worst possible place for it since most of the gain of the system is also at 9MHz.
>
> As I said, good shielding and decoupling is assured, either way!
>
> Any comments and suggestions would be most welcome
>
> 73 Hans G0UPL
> http://www.hanssummers.com
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 8.0.108 / Virus Database: 270.13.94/2367 - Release Date: 9/13/2009 5:50 AM
>
3548 2009-09-15 10:51:47 ehydra Re: Microcontroller clock frequency
It depends.
I use a clocking scheme where all higher clocks and carriers are
multiple of a low-if with good success. For best results, use a even
multiple to suppress the modulation and generally even harmonics are
lower in amplitude.
So you don't have any birdies!

If you use a XTAL on a micro and clock the rest of the circuit with a
signal out of this micro, than you will notice phase noise dependend on
what the micro does in code at actual time. That is because the MCU
generally does not have extra XTAL power supply pins. The actual current
in/out VCC/GND modulates the XTAL oscillator because of parasitic L and
R of this pins.

- Henry

--
ehydra.dyndns.info


hanssummers2000 schrieb:
> Hello all
>
> I am pondering the selection of a system clock frequency to use with a microcontroller in a high performance homebrew receiver. The receiver is a single-conversion superhet with 9MHz IF. So now I have to decide what to do about clocking the ATmega2561 microcontroller. What is the best clock frequency to use, to avoid digital noise getting into the receiver? You can take good shielding and decoupling as given, in either case...
>
> Option 1: Use 16MHz clock which is the maximum the ATmega2561 will allow. This would give highest possible clock frequency and therefore some safety margin that would help me worry less about the processor running out of cycles to look after everything.
>
> Option 2: Use the 9Mhz BFO to clock the microcontroller as system clock at 9MHz. Would this be an advantage or a disadvantage? One could argue that since the microcontroller would be clocked synchronously with the IF, there would be no opportunity at all for birdies. On the other hand, you might argue that the digital noise from the microcontroller would manifest itself as phase noise around a 9MHz carrier, which is the worst possible place for it since most of the gain of the system is also at 9MHz.
>
> As I said, good shielding and decoupling is assured, either way!
>
> Any comments and suggestions would be most welcome
>
3551 2009-09-16 01:24:47 Ashhar Farhan Re: Microcontroller clock frequency
using a carrier oscillator as a timebase will imply that the carrier
(or it's factors), will leak out. these can lead to microphonics and
AC buzz.
it is best if the osc is safely high enough so that it's multiples
don't fall inside IF and RF pass bands.
then sheild the digital circuits tightly.
- farhan

On 9/15/09, ehydra <ehydra@arcor.de> wrote:
> It depends.
> I use a clocking scheme where all higher clocks and carriers are
> multiple of a low-if with good success. For best results, use a even
> multiple to suppress the modulation and generally even harmonics are
> lower in amplitude.
> So you don't have any birdies!
>
> If you use a XTAL on a micro and clock the rest of the circuit with a
> signal out of this micro, than you will notice phase noise dependend on
> what the micro does in code at actual time. That is because the MCU
> generally does not have extra XTAL power supply pins. The actual current
> in/out VCC/GND modulates the XTAL oscillator because of parasitic L and
> R of this pins.
>
> - Henry
>
> --
> ehydra.dyndns.info
>
>
> hanssummers2000 schrieb:
>> Hello all
>>
>> I am pondering the selection of a system clock frequency to use with a
>> microcontroller in a high performance homebrew receiver. The receiver is a
>> single-conversion superhet with 9MHz IF. So now I have to decide what to
>> do about clocking the ATmega2561 microcontroller. What is the best clock
>> frequency to use, to avoid digital noise getting into the receiver? You
>> can take good shielding and decoupling as given, in either case...
>>
>> Option 1: Use 16MHz clock which is the maximum the ATmega2561 will allow.
>> This would give highest possible clock frequency and therefore some safety
>> margin that would help me worry less about the processor running out of
>> cycles to look after everything.
>>
>> Option 2: Use the 9Mhz BFO to clock the microcontroller as system clock at
>> 9MHz. Would this be an advantage or a disadvantage? One could argue that
>> since the microcontroller would be clocked synchronously with the IF,
>> there would be no opportunity at all for birdies. On the other hand, you
>> might argue that the digital noise from the microcontroller would manifest
>> itself as phase noise around a 9MHz carrier, which is the worst possible
>> place for it since most of the gain of the system is also at 9MHz.
>>
>> As I said, good shielding and decoupling is assured, either way!
>>
>> Any comments and suggestions would be most welcome
>>
>