Simulator

Arduino Mega 2560 simulator, running in this tab

Mokxi is a free Arduino Mega 2560 simulator that runs in your browser, with nothing to install and no account needed. The Mega is the Arduino for a project that ran out of pins: fifty-four digital, sixteen analog, four serial ports, on an ATmega2560 at 16 MHz. Wire the circuit, write the sketch, press Run.

  • 192parts on the bench
  • 25boards running now
  • 1.00xreal time, on every board
Arduino Mega 2560: blinklive0.000 s 0.00x
Click to open it in the editor
Real firmware, running right now on our own core. Click it to open the circuit in the editor.
What is modeled

The numbers, not the marketing

Taken from the board's own contract document and put in plain words.

The core
Every ATmega2560 mnemonic at 16 MHz, including the ones a quarter-megabyte flash needs: ELPM, EIJMP, EICALL and three-byte return addresses.
Six timers and sixteen channels
Timers 0 to 5, four of them sixteen-bit with three compare channels each, and a sixteen-channel ADC with the MUX5 bit handled for you.
Four USARTs
USART0 is the serial monitor. The other three are header pins, and what goes out of them is a real 8N1 frame on a real wire.
Go further

The full board page

Every peripheral area, every example and the wiring notes, in one place.

Arduino Mega 2560 simulatorBlink, a button and the serial monitor, running.

Questions

Is it free?

Yes, all of it, with no card and no account needed to try it.

Will an Uno sketch run on it?

The source will. The ELF will not, because it is a different chip with a different register map, so build it for the Mega and it runs.

Can I use all four serial ports?

Yes. Serial is the monitor; Serial1 to Serial3 are pins 18/19, 16/17 and 14/15, and a jumper between two of them carries real frames.

Which Mega?

The Mega 2560 R3, on the ATmega2560. Not the Mega ADK and not the older Mega 1280.

Try your own firmware on the Mega 2560

What you build here runs on the board on your desk, unchanged. Nothing to install and no account needed.