My PC speaker PWM story

Here is another story from the same era (early 1990′s). It is a continuation to my LPT DAC story. Before PC sound cards became popular, around same time as LPT DAC circuits became popular, PC speaker was also used to play back digital audio. Software (game and other) wanted to have the option to use PC speaker in case the user did not have LPT DAC or sound card. PC speaker was originally designed for just simple “beep” sounds, but with suitable programming PC speaker can be used to play back digital sampled sounds: The trick was to use send pulse-width modulated  (PWM) signal to PC speaker. The average value of voltage fed to the load is controlled by turning the switch between supply and load on and off at a fast pace. This was the same principle as used inso called “Class-D amplifiers“.

The programming trick in the PC was to set the timer that drive PC speaker to one-shot mode, and set PC interrupt rate to needed output sample rate. So at every input one sound sample value was read, converted to timer control value, programmed to timer (starting the pulse). This trick allowed around 6 bits sample resolution / dynamics (or even slightly more with some tricks). When the sample rate was high enough, you can’t hear the high frequency noise on the signal.

I even made a very good playback routines to play sampled audio through PC speaker with PWM. One day in late 1990 Epic Megagames contacted me to add my PC speaker routines to their upcoming Drum Blaster software (check video to get idea of software). Things went well up to the point when it turned out that someone had patented PWM sample playback on PC speaker (thing that they should not have granted patent in the first place because the technology was used years before the patent application was submitted by many other people). This was the first time I was hit with the flawed US software patent system

0 Comments

Be the first to post a comment.

Leave a Comment

Your email address will not be published. Required fields are marked *

*

*