3
\$\begingroup\$

hey i have some chips with the arduino bootloader on it and some chips without. I want to use them using the same circuit. The confusion I have is with the clock the arduino uses 16MHz external and avr has its internal will it cause a problem if I use them in the same circuit?

I was thinking, I just add the clock, the arduino chips will use the crystal and the other chips will not. Am I right?

\$\endgroup\$
3
\$\begingroup\$

as long as you have the fuses set to use the internal oscillator and you are not using the XTAL pins for any reason on those chips, you should be A-OK. You should not set those XTAL pins to outputs however, but rather inputs without internal pullups enabled (i.e. DDRx = 0; PORTx=0). On a separate note though, I'm not so sure you'll be OK with more than one crystal per chip. The crystals are 'passive' components, and the AVR actually has some circuitry in it for 'driving' the crystal to resonate...


EDIT OK I just wanted to make sure you weren't trying to "share" crystals. As the others have stated, I can't imagine a (sane) reason why you would have to run your chips at the same clock rate. Be mindful however, that some of your register settings (for example timer prescales, baud rate settings, etc) have implicit coupling to your clock rate, and may need adjustment in otherwise identical firmware.

\$\endgroup\$
  • \$\begingroup\$ I don't have more than one crystal on one chip. The arduino one's have there own 16MHz clock while the normal chips use the internal clock. \$\endgroup\$ – Rick_2047 Jun 2 '10 at 3:45
1
\$\begingroup\$

The clock setting of ATMega*8 chips are defined by the fuses. I'd rather use the same clock settings for the arduino chip and the AVR or you application may not work properly (especially if you use serial communication, etc...).

This page contains useful information on the subject as well as links to the relevant parts in the datasheet.

\$\endgroup\$
1
\$\begingroup\$

depends on what you mean by "cause problems".

Assuming they communicate with something like SPI or I2C with proper SoC support there will be no communication problem as SPI/I2C are designed to operate without clock syncing between ICs.

You may have signal integrity and EMI issues with multiple IC's running off independent clocks. This will be especially evident in hacked together prototype circuits with high resistance to ground for example a breadboard with wired grounds is much more an issue than a PCB with a solid 2oz ground plane.

The out of sync clocks can cause increased jitter and ground bounce in each others circuits. 1 tip is to avoid the ground current return from traveling under other circuits that run from a different clock. Always remember that high frequency current follows the path of least inductance not the path of least resistance when considering the current return path.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.