As a kid,  KnightRider was my all time favorite TV series – the car – KITT,  stunts,  car talking, autonomous mode, fancy controls, turbo mode – and who will ever forget the characteristic whoop-whoop that KITT’s LED chaser made.  Well what do know, [J]oby came up with his LED chaser using  8 LEDs in PWM mode. All you need is the Launchpad, 8 limiting resistors and 8 LEDs. The usual way to run LEDs is via PWM so that you can control its brightness( or dimness ).  The MSP430 however does not have 8 hardware PWM pins. [J]oby implemented Binary Code Modulation to carry out the chaser effect. Quote:

My solution is to use a single timer and Binary Code Modulation. BCM uses less processor time than PWM but doesn’t provide a single on and a single off period per cycle. Instead, it uses several bursts. This is fine for LEDs, where given a fast enough period the human eye can’t tell.

You can find code and schematics on his blog. Feel free to leave a comment here or on his blog page if you like this. Enjoy!

Demo video:

Just for kicks. A few classic videos:

LED chaser on the original KITT car

Classic Knight Rider Opening Credits: