1
\$\begingroup\$

I've received the PCB that I have designed.

This PCB has an atmega2560 on it.

I have designed it to use a Crystal Oscillator such as this figure shows : enter image description here

Is this designed supposed to work on an atmega2560 ?

Because, when I look at the schematic of the arduino mega, I see that they don't use a crystal oscillator, but they use a resonator with a 1M resistor : enter image description here

\$\endgroup\$
  • 3
    \$\begingroup\$ Datasheet says? \$\endgroup\$ – Ignacio Vazquez-Abrams May 6 '16 at 23:59
  • \$\begingroup\$ Looks like a crystal oscillator can be used according the datasheet on page 41. But I would have liked to have a confirmation! I'm not used to work with crystal oscillators, resonators,... \$\endgroup\$ – arckin May 7 '16 at 8:53
3
\$\begingroup\$

I have designed it to use a Crystal Oscillator such as this figure [...]

Is this [...] supposed to work on an atmega2560 ?

Yes.

Using a crystal oscillator to provide the clock input, is shown in section 10 of the ATmega2560 datasheet (as you linked). It is also discussed in the Atmel Application Note: AVR042: AVR Hardware Design Considerations which I linked in an answer to one of your previous questions.

That application note also:

  1. highlights that PCB layout is important;

  2. discusses some of the differences between crystals and ceramic resonators, but doesn't focus on one of the main reasons why ceramic resonators are used - low cost!

  3. explains how to choose the values for the external capacitors used with a crystal; your schematic showing 22pF may or may not be optimal for your specific 16MHz crystal (check your crystal's datasheet for more information).

Note that the partial schematic which you included with the crystal oscillator, is not using the correct XTAL pin numbers for the ATmega2560 (as the text shows, the schematic seems to be for an ATmega16 etc.)

Also note that you need to consider which fuse settings to use - again, this is discussed in section 10 of the ATmega2560 datasheet.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Datasheets says "Either a quartz crystal or a ceramic resonator may be used." so that answers perfectly my question ;) See section 10.4 of the full datasheet : http://www.atmel.com/Images/Atmel-2549-8-bit-AVR-Microcontroller-ATmega640-1280-1281-2560-2561_datasheet.pdf

| improve this answer | |
\$\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.