I recently conducted some performance tests on a number of Arduino variants, looking specifically at digital IO speeds. I tested PCDuino, Arduino Uno and Chipkit Uno32. The same basic code was run on each:
void setup() {
pinMode(6, OUTPUT);
}
void loop() {
digitalWrite(6, HIGH);
digitalWrite(6, LOW);
}
which just turns pin 6 on and off as fast as possible, resulting in a square wave output. Speed was measured with a Tektronix TDS220 oscilloscope.
PCDuino
This is a Ubuntu based SBC based on the Winrunner A10 chip running at 1GHz. It contains a full Linux distro including development environment and an Arduino compatible library. You can write C/C++ programs directly on the PCDuino, and link them against the libarduino library. Your program must be run as root, and runs as a normal user process (and is therefore subject to swapping).
Results:
3.3V square wave at 165kHz. There was some jitter in the pulse widths, but importantly, if another process is running, your IO program will stop running occasionally. I observed 10ms gaps in the pulse stream when another compile was running at the same time as the IO program.
165kHz is quite slow considering the chip runs at 1GHz. This is because the digitalWrite commands are passed to the hardware through file IO accesses. It is apparently not possible to talk to the IO hardware directly.
Conclusion:
Moderately fast, but dont use it for hard real-time processing.
Arduino
The well known Arduino microcontrollers include the Uno which was tested here. It runs at 16MHz, programmed in C or C++ from a PC based IDE.
Results:
5V square wave at 97kHz. There was no significant jitter in individual pulses, but I was able to observe occasional events where an individual pulse was not emitted or perhaps delayed. This is quite possibly due to interrupt handling in the Arduino timer core.
Conclusion:
Not too fast but reasonable hard real time behaviour.
ChipKit Uno32
This is an Arduino compatible (mostly) microcontroller using a PIC32MX320F128 processor running at 80Mhz. Programming it requires a custom version of the Arduino IDE which you can get from Digilent.
Results:
3.3V square wave at 355KHz. No significant jitter, but occasional delayed or missing pulses as with Arduino above.
Conclusion:
Good choice for speed and hard real time behaviour.