Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
test-and-measurement:analog-discovery-2:ad2-motor-debugger:start [2021/05/14 23:04] – ↷ Page moved from reference:test-and-measurement:analog-discovery-2:ad2-motor-debugger:start to test-and-measurement:analog-discovery-2:ad2-motor-debugger:start Arthur Browntest-and-measurement:analog-discovery-2:ad2-motor-debugger:start [2022/10/04 11:38] (current) – external edit 127.0.0.1
Line 11: Line 11:
 <WRAP group> <WRAP group>
 == Hardware == == Hardware ==
-  * [[https://store.digilentinc.com/analog-discovery-2-100msps-usb-oscilloscope-logic-analyzer-and-variable-power-supply/|Analog Discovery 2]]+  * [[https://digilent.com/shop/analog-discovery-2-100ms-s-usb-oscilloscope-logic-analyzer-and-variable-power-supply/|Analog Discovery 2]]
  
 == Software == == Software ==
-  * [[reference:software:waveforms:waveforms-3:start|]]+  * [[software:waveforms:waveforms-3:start]]
   * [[https://code.visualstudio.com/|Visual Studio Code]], or any other editor of your choice   * [[https://code.visualstudio.com/|Visual Studio Code]], or any other editor of your choice
   * C/C++ compiler (this might be included in your IDE)   * C/C++ compiler (this might be included in your IDE)
Line 20: Line 20:
 </WRAP> </WRAP>
  
-**Note:** //WaveForms can be installed by following the [[reference:software:waveforms:waveforms-3:getting-started-guide]]. By installing WaveForms, WaveForms SDK will be installed, which is needed later in this guide.//+**Note:** //WaveForms can be installed by following the [[software:waveforms:waveforms-3:getting-started-guide]]. By installing WaveForms, WaveForms SDK will be installed, which is needed later in this guide.//
 ---- ----
  
Line 54: Line 54:
  
 ===== Functions for Controlling Different Instruments ===== ===== Functions for Controlling Different Instruments =====
-In the following, the functions used for controlling the instruments in this example are discussed. For details about other available functions in the WaveForms SDK, check the [[reference:software:waveforms:waveforms-sdk:reference-manual]].+In the following, the functions used for controlling the instruments in this example are discussed. For details about other available functions in the WaveForms SDK, check the [[software:waveforms:waveforms-sdk:reference-manual]].
  
 --> Connecting and Disconnecting the Analog Discovery 2 # --> Connecting and Disconnecting the Analog Discovery 2 #
Line 400: Line 400:
  
 <WRAP group><WRAP column half> <WRAP group><WRAP column half>
-In the main function, the first step is to connect the Analog Discovery 2. If it can't be connected, the program must be finished, as the rest of the functions can't be called. The function init_AD2() is discussed under the [[reference:test-and-measurement:analog-discovery-2:ad2-motor-debugger:start#functions_for_controlling_different_instruments|Functions for Controlling Different Instruments]] heading, in the Connecting and Disconnecting the Analog Discovery 2 drop-down.+In the main function, the first step is to connect the Analog Discovery 2. If it can't be connected, the program must be finished, as the rest of the functions can't be called. The function init_AD2() is discussed under the [[test-and-measurement:analog-discovery-2:ad2-motor-debugger:start#functions_for_controlling_different_instruments|Functions for Controlling Different Instruments]] heading, in the Connecting and Disconnecting the Analog Discovery 2 drop-down.
 </WRAP><WRAP column half><code cpp> </WRAP><WRAP column half><code cpp>
 //main function //main function
Line 420: Line 420:
  
 <WRAP group><WRAP column half> <WRAP group><WRAP column half>
-To test the motor drivers, the microcontroller must be turned off by setting it's RESET pin to low. After that, the voltages on the potentiometers can be read, and the digital_write() and PWM generation functions can be used to test both motors with varying speeds, in both directions. Details about the used functions can be found under the [[reference:test-and-measurement:analog-discovery-2:ad2-motor-debugger:start#functions_for_controlling_different_instruments|Functions for Controlling Different Instruments]] heading, in the Voltmeter, Static I/O and Pattern Generator drop-downs.+To test the motor drivers, the microcontroller must be turned off by setting it's RESET pin to low. After that, the voltages on the potentiometers can be read, and the digital_write() and PWM generation functions can be used to test both motors with varying speeds, in both directions. Details about the used functions can be found under the [[test-and-measurement:analog-discovery-2:ad2-motor-debugger:start#functions_for_controlling_different_instruments|Functions for Controlling Different Instruments]] heading, in the Voltmeter, Static I/O and Pattern Generator drop-downs.
 </WRAP><WRAP column half><code cpp> </WRAP><WRAP column half><code cpp>
 //main function //main function
Line 450: Line 450:
  
 <WRAP group><WRAP column half> <WRAP group><WRAP column half>
-To record the signals coming from the MCU, it must be turned on, by setting its RESET pin to logic high. After this, the number of samples to record must be specified (data_size), and a matrix with the proper size (digital_data) must be created before recording the data. After the acquisition, data loss/corruption should be checked, then the recordings should be saved in a file. Details about the digital_read() function can be found under the [[reference:test-and-measurement:analog-discovery-2:ad2-motor-debugger:start#functions_for_controlling_different_instruments|Functions for Controlling Different Instruments]] heading, in the Logic Analyzer drop-down.+To record the signals coming from the MCU, it must be turned on, by setting its RESET pin to logic high. After this, the number of samples to record must be specified (data_size), and a matrix with the proper size (digital_data) must be created before recording the data. After the acquisition, data loss/corruption should be checked, then the recordings should be saved in a file. Details about the digital_read() function can be found under the [[test-and-measurement:analog-discovery-2:ad2-motor-debugger:start#functions_for_controlling_different_instruments|Functions for Controlling Different Instruments]] heading, in the Logic Analyzer drop-down.
 </WRAP><WRAP column half><code cpp> </WRAP><WRAP column half><code cpp>
 printf("\nReading the output signals of the MCU:\n"); printf("\nReading the output signals of the MCU:\n");
Line 493: Line 493:
  
 <WRAP group><WRAP column half> <WRAP group><WRAP column half>
-When the program is finished, the Analog Discovery 2 must be closed, to make it available to other software. Details about the close_AD2() function can be found under the [[reference:test-and-measurement:analog-discovery-2:ad2-motor-debugger:start#functions_for_controlling_different_instruments|Functions for Controlling Different Instruments]] heading, in the Connecting and Disconnecting the Analog Discovery 2 drop-down.+When the program is finished, the Analog Discovery 2 must be closed, to make it available to other software. Details about the close_AD2() function can be found under the [[test-and-measurement:analog-discovery-2:ad2-motor-debugger:start#functions_for_controlling_different_instruments|Functions for Controlling Different Instruments]] heading, in the Connecting and Disconnecting the Analog Discovery 2 drop-down.
 </WRAP><WRAP column half><code cpp> </WRAP><WRAP column half><code cpp>
 // close opened device // close opened device
Line 517: Line 517:
  
 ===== Final Notes ===== ===== Final Notes =====
-For more guides and example projects for your Analog Discovery 2, please visit its [[reference:test-and-measurement:analog-discovery-2:start|Resource Center]].+For more guides and example projects for your Analog Discovery 2, please visit its [[test-and-measurement:analog-discovery-2:start|Resource Center]].
  
-For more information about how to use WaveForms SDK, please visit the [[reference:software:waveforms:waveforms-sdk:reference-manual]].+For more information about how to use WaveForms SDK, please visit the [[software:waveforms:waveforms-sdk:reference-manual]].
  
 For technical support, please visit the [[https://forum.digilentinc.com|Digilent Forums]]. For technical support, please visit the [[https://forum.digilentinc.com|Digilent Forums]].
  
 {{tag>project analog-discovery-2}} {{tag>project analog-discovery-2}}