Turn-key PCB assembly services in prototype quantities or low-volume to mid-volume production runs

Raspberry Pi GPIO benchmark update

Couple years ago Joonas from Code and Life have made pretty extensive Raspberry Pi GPIO speed benchmark. But things have changed over two years. Specifically speaking hardware of first generation Raspberry Pi remained same, but firmware and software libraries overcome series of upgrades. It became interesting how GPIO speed have changed since last check. He tested several libraries and languages. To test GPIO performance a simple pin toggle endless loop were run. Results were quite different comparing to tests done couple years ago. Lets see few of them. First of all he tested Shell based scripts. This method gave 2.9kHz square wave. When using WiringPi library toggling speed dropped down to 40Hz. So it seems that shell scripting is suitable for slow signaling. Python with Rpi.GPIO showed pretty good improvement. From earlier 0.3.0 version 44kHz in version 0.5.10 it jumped to 70kHz. This is great speed for most interfacing tasks. Also python is versatile scripting language to use. Python with Wiring Pi didn’t perform as good – 28kHz, but still pretty useable. Best performance is visible when using C native… Continue reading