function to generate a PPM output?

A nice little video showing ppm and pwm .