Although the Altera MAX IIZ CPLD is a digital programmable logic device, it is versatile enough to control analog systems. This white paper shows how the MAX IIZ CPLD, alone or with a few passive components, can replace a digital-to-analog converter, allowing it to drive an audio speaker and control LED intensity, motor speed, and servo position. This white paper also will explain pulse-width modulator (PWM) operation, as well as describe the efficient implementation and use of PWMs in a MAX IIZ CPLD.