Electronic – arduino – AVR external clock problem

arduinoavrbootloader

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?

Best Answer

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.