Tuesday, 12 February 2013
HackADay: Better PWM on the Raspberry Pi
Normally these would be driven from a PWM (pulse wide modulated) pin on the controller. On a Microchip PIC there are normally three, even more on an Arduino, but the poor old Pi only has one, which makes it as good as useless for many robot projects.
You can get buy by waggling one of the output pins up and down, which is called bit banging apparently, but that uses vast amounts of CPU time, and makes programming other routines far more difficult.
The two guys who contributed to the project mentioned here have been experimenting with all kinds of black magic to do with the direct memory access, it seems clever enough but to be honest I an not familiar enough with the Pi yet to give a valued comment.
My current robot project started before the Pi was available, so it uses an 877 PIC, but for my next I will at least give this idea a quick glance first :)
More details from http://hackaday.com/2013/02/10/better-pwm-on-the-raspberry-pi/