1
\$\begingroup\$

Because of sourcing issue we're replacing an ATmega2561 with an ATmega2560 in a BGA housing on a little adapter PCB.

The most obvious difference is the number of Pins. The ATmega2560 has 36 pins more than the ATmega2561 but they have the same functions (mostly).

Another Difference is the position of the ISP (in circuit serial programming) pins which are combined with different functions on different pins (they only write about the TQFP packages and forget the BGA Package despite it being in the same datasheet otherwise). Serial Programming Pin Mapping Luckily, there is still JTAG where the pins stay the same.

Now other than that, how "compatible" are they? Can I run machine code compiled for the ATmega 2561 (the one with less pins) on the ATmega 2560? Or are there internal differences for example in memory layout as well?

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

The ATmega2561 is a true subset of the ATmega2560. If your software doesn't use port H/J/K/L, USART 2/3, TC 4/5, it will run on the ATmega2561 as well. And vice versa.

That moving around of the ISP data pins is an oddity.

\$\endgroup\$
5
  • \$\begingroup\$ Thank you. Do you have deeper knowlege on that? Until recently I thought that they would be using the same die in different packages and set some fuse to change the Chip ID. But the ISP pins really threw me off (and bit me, quite hard!) \$\endgroup\$
    – kruemi
    Nov 29, 2022 at 13:23
  • 1
    \$\begingroup\$ No particular insight into that chip. I've written an embedded assembler recently that covers that whole family of chips and had to read and compare lot of the datasheets. No idea about the dies, but my impression is that Atmel is without qualms when it comes to redoing a die.Otherwise we wouldn't have that zoo of slightly incompatible AVRs. \$\endgroup\$
    – Janka
    Nov 29, 2022 at 13:48
  • 1
    \$\begingroup\$ @kruemi Oh, as a caveat, you have to be aware the ATmega2560 has a few interrupt vectors more. So if your ATmega2561 software enables the interrupts on USART 2 or USART 3 by messing with those registers (though not present in the ATmega2561), you may run into problems if your program code starts at 0x0066 instead of 0x0072. \$\endgroup\$
    – Janka
    Nov 29, 2022 at 14:05
  • \$\begingroup\$ Thank you very much. Since we're replacing the small 2561 with the bigger 2560 there should not be any issues than since we havn't had any of the additional infrastructure to start with. \$\endgroup\$
    – kruemi
    Nov 30, 2022 at 5:40
  • \$\begingroup\$ About the "same die": The 2560 and 2561 have exactly the same errata, which led me to believe they use the same die. But might also be because they just copy/pasted most of the stuff (also "funny" that the non working gain is only montioned in the errata and not in the rest of the documentation) \$\endgroup\$
    – kruemi
    Nov 30, 2022 at 6:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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