===== Electronics Explorer - Intro to the Static I/O and Digital Pattern Generator ===== ~~TechArticle~~ * Using the WaveForms Static I/O and Digital Pattern Generator to blink an LED. ---- ===== Introduction ===== This is a basic project designed that will demonstrate how to use the digital I/O devices and the Digital Pattern Generator within the WaveForms software. The objective of this project is to assemble a simple LED circuit on the EE Board and control the blinking of the LED with each of the aforementioned instruments. ===== Materials ===== * Electronics Explorer Board w/ Power Supply and USB cable * From the Starter Parts Kit: * 10 Ω Resistor * LED * Jumper wire * WaveForms Software ([[https://digilent.com/shop/software/digilent-waveforms/|download]]) - //WaveForms 3.5.4 is used in this tutorial// ===== Procedures ===== ==== Blinking an LED with the Static I/O ==== - Connect the EE Board to your PC with the USB cable. - Connect the board's external power supply and flip the **Ready** switch to the **ON** position. - Build the circuit. * The figure below shows the completed circuit. {{ :learn:instrumentation:tutorials:electronics-explorer-static-io-and-pattern-generator:static_io_circuit.png?nolink600 |}} - Launch the WaveForms Software. The **Device Manager** will pop up. Click your **EExplorer** on the list and click **Select**. The WaveForms main window will now appear. - Click on the {{:learn:instrumentation:tutorials:electronics-explorer-static-io-and-pattern-generator:staticio_icon.png?nolink|}} icon to open the Static I/O instrument. * The window in the next figure will appear. {{ :learn:instrumentation:tutorials:electronics-explorer-static-io-and-pattern-generator:staticio.png?nolink700 |}} - Since the LED we are using is connected to the row labeled as 31, we are interested in DIO 31 in the Static I/O instrument. Right-click on DIO31 and select **Push Button**. {{ :learn:instrumentation:tutorials:electronics-explorer-static-io-and-pattern-generator:change_dio_31.png?nolink |}} Notice that it will now change to look like the following: {{ :learn:instrumentation:tutorials:electronics-explorer-static-io-and-pattern-generator:dio_31_button_mode.png?nolink |}} - Now click the virtual button and observe what happens. The LED on the EE Board and the virtual LED in the Static I/O instrument should both light up. - Right-click on DIO 31 again and notice that it can also be configured as a Push/Pull Switch, Three-State Switch, Open Source Switch, and Open Drain Switch. Experiment with these other I/O devices and observe the LED's behavior. Note the characteristics of each I/O device in the list below. * The //Push/Pull// Switch behaves as a standard slide switch. * The //Three-State// Switch has an additional high-impedance state (Z). * The //Open Source// Switch toggles between a logic high (1) high-impedance state (Z). * The //Open Drain// Switch toggles between a logic low (0) and a high-impedance state (Z). - Continue on to the next section to control the LED using the WaveForms Digital Pattern Generator. ==== Blinking an LED with the Digital Pattern Generator ==== - The same circuit will be used for this portion of the project as well. - Close the Static I/O instrument and return to the WaveForms main window. Click the Pattern Generator icon {{:learn:instrumentation:tutorials:electronics-explorer-static-io-and-pattern-generator:patterns_icon.png?nolink|}} to open the Digital Pattern Generator. - In the Digital Pattern Generator window, click **Add** and **Signals** as shown in the figure below. Doing so will open the **Add Signals** window, also shown below on the right. Again, we will use DIO 31. Select it and click **Add**. {{:learn:instrumentation:tutorials:electronics-explorer-static-io-and-pattern-generator:green_add_channel.png?nolink|}} - You will now see DIO 31 as a signal on the left side of the window. Before configuring the signal itself, set the **Scale** to **Manual** and the **Time Base** (labeled as "Show:") to **1s/div**. Also, make sure the DPG is set to **Run** **Continous**ly. {{ :learn:instrumentation:tutorials:electronics-explorer-static-io-and-pattern-generator:pattern_generator_setup.png?nolink700 |}} - Right-click on DIO 31 and click on **Edit Parameters of "DIO 31"**. Configure the parameters as follows: * Set **Type** to **Clock**. * Set **Output** to **PP** (Push-Pull). * Set the **Frequency** to **500mHz** (0.5Hz). * The rest of your parameters should match those shown in the figure below. {{ :learn:instrumentation:tutorials:electronics-explorer-static-io-and-pattern-generator:dio31_settings.png?nolink700 |}} - Return to the DPG window and click **Run**. Observe the results. - Experiment with various settings in the parameters window. Try changing the output to Open-Drain (OD) and Open-Source (OS) and observe what happens. - Set the output back to **PP**. Now try adjusting the frequency value and see what happens. * You can also re-open the Static I/O window and observe the behavior of the virtual LED. Note: Above frequencies of 10Hz, the virtual LED is no longer of accurate representation of the circuit's behavior due to USB communication delays. {{tag>learn instrumentation tutorial electronics-explorer}}