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
learn:courses:unit-6:start [2017/06/15 20:57] – [4.1. Hardware] Talesa Bleythinglearn:courses:unit-6:start [2022/10/04 11:38] (current) – external edit 127.0.0.1
Line 3: Line 3:
  
 === Unit 6 Labs === === Unit 6 Labs ===
-  * [[https://reference.digilentinc.com/learn/courses/unit-6-lab6a/start|Lab 6a]] +  * [[/learn/courses/unit-6-lab6a/start|Lab 6a]] 
-  * [[https://reference.digilentinc.com/learn/courses/unit-6-lab6b/start|Lab 6b]]+  * [[/learn/courses/unit-6-lab6b/start|Lab 6b]]
  
  
Line 40: Line 40:
 ===== 4. Equipment List ===== ===== 4. Equipment List =====
 ==== 4.1. Hardware ==== ==== 4.1. Hardware ====
-  - [[http://store.digilentinc.com/basys-mx3-pic32mx-trainer-board-recommended-for-embedded-systems-courses/|Basys MX3 trainer board]]+  - [[https://digilent.com/shop/basys-mx3-pic32mx-trainer-board-for-embedded-systems-courses/|Basys MX3 trainer board]]
   - Workstation computer running Windows 10 or higher, MAC OS, or Linux   - Workstation computer running Windows 10 or higher, MAC OS, or Linux
-  - 2 [[http://store.digilentinc.com/usb-a-to-micro-b-cable/|Standard USB A to micro-B cables]] +  - 2 [[https://digilent.com/shop/usb-a-to-micro-b-cable/|Standard USB A to micro-B cables]] 
-  - [[http://store.digilentinc.com/motor-gearbox-1-19-gear-ratio-custom-12v-motor-designed-for-digilent-robot-kits/|12 V DC motor with tachometer]] +  - [[https://digilent.com/shop/dc-motor-gearbox-1-19-gear-ratio-custom-12v-motor-designed-for-digilent-robot-kits/|12 V DC motor with tachometer]] 
-  - [[http://store.digilentinc.com/5v-4000ma-switching-power-supply/|5V, 4A DC power supply]]+  - [[https://digilent.com/shop/5v-4a-switching-power-supply/|5V, 4A DC power supply]]
  
 In addition, we suggest the following instruments: In addition, we suggest the following instruments:
-  - [[http://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]]
  
 ==== 4.2. Software ==== ==== 4.2. Software ====
Line 54: Line 54:
   - [[http://www.microchip.com/SWLibraryWeb/product.aspx?product=PIC32%20Peripheral%20Library|PLIB Peripheral Library]]   - [[http://www.microchip.com/SWLibraryWeb/product.aspx?product=PIC32%20Peripheral%20Library|PLIB Peripheral Library]]
   - [[http://www.microchip.com/xcdemo/xcpluspromo.aspx|XC32 Cross Compiler]]   - [[http://www.microchip.com/xcdemo/xcpluspromo.aspx|XC32 Cross Compiler]]
-  - [[http://store.digilentinc.com/waveforms-2015-download-only/|WaveForms 2015]] (if using the Analog Discovery 2)+  - [[https://digilent.com/shop/software/digilent-waveforms/|WaveForms]] (if using the Analog Discovery 2)
   - [[http://www.putty.org/|PuTTY Terminal Emulator]]   - [[http://www.putty.org/|PuTTY Terminal Emulator]]
   - Spreadsheet application (such as Microsoft Excel)   - Spreadsheet application (such as Microsoft Excel)
Line 204: Line 204:
  
 === 7.2.2. Analog Output: Pulse-width Modulation === === 7.2.2. Analog Output: Pulse-width Modulation ===
-In [[https://reference.digilentinc.com/learn/courses/unit-5-lab5a/start|Lab 5]], we used [[https://en.wikipedia.org/wiki/Pulse-width_modulation|pulse-width modulation]] to generate a communications signal of a constant frequency pulse train where the carrier frequency was turned on by setting the PWM output ratio to 9%, and off by setting the output PWM ratio to 100%. The information used to modulate the IR beam is contained in the amplitude modulation of the PWM carrier signal. In Labs 6a and 6b, the information is contained in the duty cycle of the PWM signal, which is a form of frequency modulation. This signal will be demodulated with low pass filtering to generate an analog control signal.+In [[/learn/courses/unit-5-lab5a/start|Lab 5]], we used [[https://en.wikipedia.org/wiki/Pulse-width_modulation|pulse-width modulation]] to generate a communications signal of a constant frequency pulse train where the carrier frequency was turned on by setting the PWM output ratio to 9%, and off by setting the output PWM ratio to 100%. The information used to modulate the IR beam is contained in the amplitude modulation of the PWM carrier signal. In Labs 6a and 6b, the information is contained in the duty cycle of the PWM signal, which is a form of frequency modulation. This signal will be demodulated with low pass filtering to generate an analog control signal.
      
 Lab 5 discussed the details of how to set up a PWM output using the output compare special function of the PIC32 processor. However, Lab 6a and 6b will require that we set up two PWM outputs that all use a common timer if the motor is to be capable of reversing direction. After initializing the timer to be used with the output compare and initializing the two output-compare channels, the PWM duty cycle of each individual channel is easily changed using the instruction //SetDCOCxPWM(DC);// where x denotes the PWM channel and DC is the compare setting. DC is computed by multiplying timer period register by the percent PWM. Provided that the two instructions used to modify the PWM duty cycle are completed within the PWM period, both outputs will simultaneously change their duty cycle at the end of the next PWM period.    Lab 5 discussed the details of how to set up a PWM output using the output compare special function of the PIC32 processor. However, Lab 6a and 6b will require that we set up two PWM outputs that all use a common timer if the motor is to be capable of reversing direction. After initializing the timer to be used with the output compare and initializing the two output-compare channels, the PWM duty cycle of each individual channel is easily changed using the instruction //SetDCOCxPWM(DC);// where x denotes the PWM channel and DC is the compare setting. DC is computed by multiplying timer period register by the percent PWM. Provided that the two instructions used to modify the PWM duty cycle are completed within the PWM period, both outputs will simultaneously change their duty cycle at the end of the next PWM period.