Hello everyone,
I have 3 ATmega32's. Can I drive all three from one crystal or do I need one crytal per MCU? I,ve looked at the data Sheet and it does mention that a full swing crystal can drive more than one device, but thats all that is says. Does anyone have more info or perhaps a link on this?
CrossRoads posted a dual Atmega design that had 2, 328 chips connected to 1 crystal. The design was untested but, according to the datasheet it should work. You might be able to get 3 together but, you have to have the chips close together and that would pose a problem.
You would have to look threw a lot of posts or check with CrossRoads if you are serious about trying this idea. You would probably be better off using 3 separate crystals and using SPI to communicate between chips.
A crystal and two caps costs a significant fraction of the uController itself - you might want all your timing to be lockstep too.
Yes, just connect the crystal output pin from the chip with the crystal to the crystal inputs of the other chips, check datasheet to see which pin is which. Things will be more complex if you want to use sleep mode;)
If its for reasons of saving space or components, why not try without any crystal? You would need to set fuses to use the internal resonator, which then you can place your components anywhere,
unless you need precision timing its not too bad of a way to go
winner10920:
If its for reasons of saving space or components, why not try without any crystal? You would need to set fuses to use the internal resonator, which then you can place your components anywhere,
unless you need precision timing its not too bad of a way to go
The internal RC oscillator is only pre-callibrated to +/- 10% so is not good enough for serial comms. It can be user callibrated to +/-1% but this depends on the voltage and the temperature so it may cause a lot of issues. Also 8MHz may be too slow for some applications - if you are needing multiple micro controllers I would assume that compute power may be important (or else one would be sufficient).
DigitalJohnson:
I have 3 ATmega32's. Can I drive all three from one crystal or do I need one crytal per MCU?
The AtMega328 can be programmed to output a full-swing clock its PB0 pin. In a multi-mcu design, you connect the crystal to one controller and use the full swing output to feed the others.