Real Analog Lab Module LED Drive with Pulse Width Modulation 1) Build the LED driver circuit shown in figure 1, preferably on your solder-less breadboard. Use different color LEDs (for example, red and green) if you have them. Vp 74HC04 Hex Inverter 100 Red LED 14 1 2 D0 3 4 100 7 GND FT A R D Green LED Figure 1 PWM LED driver circuit 2) Connect the D0 signal and the positive 5 volt power supply Vp to the circuit as shown. 3) Start the Waveforms software. Note: When closing, the WaveForms software stores the last configuration (if set to do so). This tutorial assumes the factory default settings are used. To make sure that you have the factory default settings (even if somebody previously saved a different WaveForms configuration on your machine), click “Options” in the WaveForms main window, then “Erase configuration” in the Options window. Close the Options window. © 2012 Analog Devices Inc., and Digilent, Inc. 1 Real Analog Lab Module LED Drive with Pulse Width Modulation 4) Open power supply control window and turn on VP+ 5) Open up the Digital Patterns screen. Add a signal. Select DIO 0.Set the type to clock. You should see something that looks like the screen below. Lastly, hit the Run button. A R D FT 6) Open the edit signal parameters window by clicking on the little blue pencil icon. Make sure the type is set to clock and the output is set to PP (push-pull). Set the frequency to 1MHz. With the Duty cycle set to 50% both LEDs should be on equally bright. 7) Adjust the duty cycle ( pulse width ) from 0% to 100% using the slider. At 0% the green LED should be completely off and at 100% the red LED should be completely off. 8) Congratulations – you have generated your first pulse width modulated clock with the Analog Discovery! 2