Sim LabArduino
Pins and functions
Which Arduino functions work in the simulator, and how the pins behave electrically.
Pin numbers
| Arduino pin | Notes |
|---|---|
| D0 to D13 | Digital pins. |
| A0 to A5 | Analogue inputs. They also work as digital pins 14 to 19. |
| 5V, 3.3V, GND | Power pins. |
Functions that work
pinMode, digitalWrite and digitalRead work on all pins.Electrical behaviour
| Pin mode | What the circuit sees |
|---|---|
| Output | 0 V or 5 V behind about 25 Ω |
INPUT_PULLUP | 5 V behind about 35 kΩ |
INPUT | Very high resistance (100 MΩ) |
An input reads LOW below about 1.5 V and HIGH above about 3 V.
Timing accuracy
The circuit looks at each pin once every 50 microseconds. That is fine for LEDs, buttons, servos and PWM, but:
- Signals faster than about 10 kHz are only sampled, and two edges inside one 50 µs step are not both seen by the circuit.
- Very fast PWM and bit-banged protocols that go through ordinary circuit parts don't work well.
- Displays and the keypad watch the pins in CPU time, so they are not affected.