I made a bunch of projects based on 328p, but never made a single one based on Mega 2560. It will be as few components as possible. According to Arduino's official schematics, there are some components more than this, as 22pF cap across Reset and GND. Any suggestions I would appreciate.
The bootloader will be programmed by ICSP and sketch by programming header.
But, my goal is to add a few things, which for now is not important. The question is, are schematic messed a little or not? Your project is some sort of a dev board. In my case, there should be a bunch of things on a PCB 10x10cm.
Huh - that was an interesting twist by the automated software.
Both boards make all 86 IO pins available, not just the 70 offered on the Mega.
Need to create a new board type with a modified pins_arduino.h like this.
Can also use MCUDude's MegaCore for the 2560, which takes the concept further.
Every so often, I consider putting male pins on the bottom of the board and making a main board that I can plug it onto, keeping a modular design approach.
Design up the rest of the system, plug on a 2560, and away you go ...
Well, for a start, it will be 2560 only. One PCB just to test a few things.
But, I have in mind some very big projects. Mega 2560 is funny to use to light a few LEDs.
The 2560 will perform best with those few components located close to the chip. No long traces, no traces under the crystal, and Gnd plane under the crystal on both sides.
I am using 6 Mega2560s to control this big motor array for an 8x12 kinetics display.
There ought to be 1 0.1uF cap on each Vcc pin, plus another on AVcc. But yup, I only see three on my physical arduino mega2560! I'd say that was surprising, except that the Arduino hardware is never a monument to good design or anything.
As another aside, you're supposed to put the crystal on the same side of the PCB as the chip... (ahem, crossroads). And it's supposed to be as close to the chip as possible (ahem, Arduino...). The decouplign caps shouod be as close to the chip as posible, too (ahem, cheap chinese clone manufacturers)
Finally, why are you planning to use a m2560? Do you really need that many pins, or more than 128k of flash? The new AVR128DA64 has 56 I/O pins, newer peripherals, can run at 24MHz (32 in practice) over the whole 1.8~5.5 V operating voltage range, and has the snazzy new peripherals (12-bit ADC analogRead() ~3x faster, event system, more PWM pins and more) too. If you need an external crystal, use the AVR128DB64 instead (supply chains are still spotty, but should be available from mainstream distrubutors soon, and you can do all your development with the DA-series parts while you wait for the DB's - frankly, you probably don't need external crystal: the internal oscillator on the post-2016 AVRs is miles better than the old ones. On - the DB-series also has "MVIO" - PORTC can run at a different voltage than the rest of the chip!). Both are supported by my DxCore, and are priced at a tenth what the atmega2560 is.
"you're supposed to put the crystal on the same side of the PCB as the chip."
Why? Thru hole crystal would have a via per leg to hold the chip to the board and connect to the uC.
SMD part on the other side of the board has the same one via.
I have not seen any operational difference.
I made a bunch of projects based on 328p, but never made a single one based on Mega 2560. It will be as few components as possible. According to Arduino's official schematics, there are some components more than this, as 22pF cap across Reset and GND. Any suggestions I would appreciate.
You need decoupling to ground on AREF, otherwise analog will be ropey.
You need a decoupling capacitor per power pin, so 5 of them for the 5 Vcc and AVcc pins. They must
be right close to the pin (within a few mm is great, they'll probably end up being on the botton layer
with vias).
You should have bulk decoupling somewhere on the board too, 47uF or similar perhaps.