When using microcontroller and want to drive motor control or control led intensity you can use DAC to generate analog output voltage. But there is an easier way of doing this. You can use digital output to reach same results. This technique is known as PWM -Pulse Width Modulation. In this picture you can see 50% duty cycle square wave form. The width of ‘0’ is equal to ‘1’ level, this means if signal amplitude is 5V, then average voltage over one cycle is 2.5V. It is as though of hawing constant 2.5V voltage.