Why the sketch size and amount of RAM used by Arduino DUE is more than Arduino MEGA 2560 -
can please tell me why due sketches occupy more ram compared mega same code. need make analysis.
please solve query.
it's because have different microcontrollers: arduino mega 2560 has 8-bit avr atmega2560 microcontroller , arduino due has 32-bit arm cortex-m3 microcontroller.
ram
variables smaller in 8-bit architectures in 32-bit architectures. example: int
2 bytes long in mega 2560 4 bytes long in due.
because of that, program in due use more ram program in mega 2560 (and other atmega-based arduino board uno , leonardo).
sketch size
the reason similar ram: instructions in 8-bit avr architectures 16 bits long while in arm architectures, majority of instructions 32 bits long.
Comments
Post a Comment