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:openscope-mz:reference-manual [2021/05/14 23:05] – ↷ Page moved from reference:test-and-measurement:openscope-mz:reference-manual to test-and-measurement:openscope-mz:reference-manual Arthur Browntest-and-measurement:openscope-mz:reference-manual [2023/02/12 02:01] (current) – external edit 127.0.0.1
Line 86: Line 86:
 {{ reference:test-and-measurement:openscope-mz:openscopemz_walk_around.png?1100 |Walk Around the OpenScope}} {{ reference:test-and-measurement:openscope-mz:openscopemz_walk_around.png?1100 |Walk Around the OpenScope}}
  
-====== Oscilloscope ======+===== Oscilloscope =====
 OpenScope MZ uses the ADC on the PIC32MZ to create a 2 channel oscilloscope with 12-bits of resolution per channel. Each channel has a pair of analog inputs with a PWM output to facilitate the interleaving of the two inputs, one PWM to handle the input offset voltages, and one DMA channel at the second highest priority to transfer the measured data. OpenScope MZ uses the ADC on the PIC32MZ to create a 2 channel oscilloscope with 12-bits of resolution per channel. Each channel has a pair of analog inputs with a PWM output to facilitate the interleaving of the two inputs, one PWM to handle the input offset voltages, and one DMA channel at the second highest priority to transfer the measured data.
  
Line 107: Line 107:
     * Reduced from a maximum size of 32766 samples to account for ADC warm-up and pre-trigger data, various delay timer overrun sources, and a 4 byte reduction to prevent large DMA stalls when the maximum destination block size is used.     * Reduced from a maximum size of 32766 samples to account for ADC warm-up and pre-trigger data, various delay timer overrun sources, and a 4 byte reduction to prevent large DMA stalls when the maximum destination block size is used.
  
-======= Function Generator ======+===== Function Generator =====
 The OpenScope MZ has a single channel 10 MS/s 10-bit function generator. An R2R resistor ladder with 1% resistors is used in place of a DAC. Due to the nature of resistor ladders, it is possible to have a missing code for steps larger than 3 mV or encounter propagation delays, most notably when switching between the values of 0x1FF and 0x200. The channel uses 10 IO pins on the PIC32MZ to generate the output through the resistor ladder and a DMA channel that is shared with the Logic Analyzer at the highest priority level to transfer data and a PWM output to control the offset voltage level. The OpenScope MZ has a single channel 10 MS/s 10-bit function generator. An R2R resistor ladder with 1% resistors is used in place of a DAC. Due to the nature of resistor ladders, it is possible to have a missing code for steps larger than 3 mV or encounter propagation delays, most notably when switching between the values of 0x1FF and 0x200. The channel uses 10 IO pins on the PIC32MZ to generate the output through the resistor ladder and a DMA channel that is shared with the Logic Analyzer at the highest priority level to transfer data and a PWM output to control the offset voltage level.
  
Line 116: Line 116:
 {{ reference:test-and-measurement:openscope-mz:transmission_delay.png?600 |Actual Propagation delay}} {{ reference:test-and-measurement:openscope-mz:transmission_delay.png?600 |Actual Propagation delay}}
  
-Digilent's [[:reference:software:waveforms-live:start|WaveFormsLive]] supports a calibration option for the function generator where each voltage code is applied and then read via the feedback network; the 1000 best codes that most closely match the ideal values (i.e. every 3 mV) are saved in a lookup table for future use by the function generator.+Digilent's [[software:waveforms-live:start|WaveFormsLive]] supports a calibration option for the function generator where each voltage code is applied and then read via the feedback network; the 1000 best codes that most closely match the ideal values (i.e. every 3 mV) are saved in a lookup table for future use by the function generator.
  
 {{ reference:test-and-measurement:openscope-mz:function_generator_feedback.png?600 |Feedback circuit for the Function Generator}} {{ reference:test-and-measurement:openscope-mz:function_generator_feedback.png?600 |Feedback circuit for the Function Generator}}
Line 129: Line 129:
  
  
-====== Digital I/O ======+===== Digital I/O =====
 The OpenScope MZ has 10 user IO pins that are shared between the Logic Analyzer and as digital input/output pins. A DMA channel shared with the AWG at the highest priority level is used to transfer data received by the PIC32MZ. The OpenScope MZ has 10 user IO pins that are shared between the Logic Analyzer and as digital input/output pins. A DMA channel shared with the AWG at the highest priority level is used to transfer data received by the PIC32MZ.
  
Line 142: Line 142:
  
  
-====== DC Power Supplies ======+===== DC Power Supplies =====
 OpenScope MZ has two DC outputs that are driven by their own PWM output with a single PWM line for the DC offset. A gain circuit is implmented on the OpenScope MZ to provide a voltage range of -4 V to 4 V for each channel. A feedback circuit is also present to allow for calibration of the DC output.  OpenScope MZ has two DC outputs that are driven by their own PWM output with a single PWM line for the DC offset. A gain circuit is implmented on the OpenScope MZ to provide a voltage range of -4 V to 4 V for each channel. A feedback circuit is also present to allow for calibration of the DC output. 
  
Line 155: Line 155:
   * 50 mA per channel   * 50 mA per channel
  
-====== Communication with the host ======+===== Communication with the host =====
 A block diagram of how the OpenScope MZ communicates with the host is provided below: A block diagram of how the OpenScope MZ communicates with the host is provided below:
  
Line 165: Line 165:
  
 ===== WiFi ===== ===== WiFi =====
-The OpenScope MZ uses a MRF24WG0MA WiFi chip to enable wireless communication with a browser based UI, [[reference:software:waveforms-live:start|WaveFormsLive]] (WFL). The OpenScope MZ itself implements a simple HTTP Server that stores static web content on a μSD card and supports dynamic content implemented in the code through the Digilent deIP™ Network Stack. More information about WFL and the [[/reference/software/digilent-agent/start|Digilent Agent]] can be found on the [[reference:test-and-measurement:openscope-mz:start|OpenScope MZ Resource Center]].+The OpenScope MZ uses a MRF24WG0MA WiFi chip to enable wireless communication with a browser based UI, [[software:waveforms-live:start|WaveFormsLive]] (WFL). The OpenScope MZ itself implements a simple HTTP Server that stores static web content on a μSD card and supports dynamic content implemented in the code through the Digilent deIP™ Network Stack. More information about WFL and the [[software:digilent-agent:start|Digilent Agent]] can be found on the [[test-and-measurement:openscope-mz:start|OpenScope MZ Resource Center]].
  
-====== Timers ======+===== Timers =====
 /*Other documentation suggests that there are 2 timers for the ADC, 1 for DC/OC, 1 for offset DC, 2 for AWG/LA, 1 for trigger, 1 for hardware protocol, and 1 spare. Horray. Learned that timers are not PWM. PWM is done via output compare modules. So good on timers. */ /*Other documentation suggests that there are 2 timers for the ADC, 1 for DC/OC, 1 for offset DC, 2 for AWG/LA, 1 for trigger, 1 for hardware protocol, and 1 spare. Horray. Learned that timers are not PWM. PWM is done via output compare modules. So good on timers. */
  
Line 173: Line 173:
  
 /* Both this timers section and the Triggers section claim that they control the DMA transfers...awkward. */ /* Both this timers section and the Triggers section claim that they control the DMA transfers...awkward. */
-====== Triggers ======+===== Triggers =====
  
 The PIC32MZ triggers are used to initiate and control all of the DMA transfers in the OpenScope MZ. When a trigger is enabled, a data acquisition will run continuously before the trigger event because it is not known when the trigger event will occur. Data acquisition will also continue to run until all post trigger data is collected. Due to data acquisition size limitations, it is not possible to measure a point of interest that exists too far in advance prior to the trigger event. The reverse for a point of interest too far after a trigger event is also true. The PIC32MZ triggers are used to initiate and control all of the DMA transfers in the OpenScope MZ. When a trigger is enabled, a data acquisition will run continuously before the trigger event because it is not known when the trigger event will occur. Data acquisition will also continue to run until all post trigger data is collected. Due to data acquisition size limitations, it is not possible to measure a point of interest that exists too far in advance prior to the trigger event. The reverse for a point of interest too far after a trigger event is also true.
Line 187: Line 187:
   * Pattern matching of the LA signal channels is not supported   * Pattern matching of the LA signal channels is not supported
  
-====== DMA ======+===== DMA =====
 8 out of 8 DMA channels available on the PIC32MZ are used on the OpenScope MZ. Two channels are dedicated to UART, a pair of DMA channels are assigned to each interleaved ADC channel for a total of four channels, one channel is shared between the function generator and the logic analyzer and one dedicated to hardware protocol communication. All DMA channels can be triggered on any interrupt event and do not require the use of an ISR.  8 out of 8 DMA channels available on the PIC32MZ are used on the OpenScope MZ. Two channels are dedicated to UART, a pair of DMA channels are assigned to each interleaved ADC channel for a total of four channels, one channel is shared between the function generator and the logic analyzer and one dedicated to hardware protocol communication. All DMA channels can be triggered on any interrupt event and do not require the use of an ISR. 
  
Line 194: Line 194:
 /* DMA is used to transfer data without utilizing the CPU and works in parallel with the CPU and has the ability to access peripherals and non-cached memory on the CPU. However, all cell transfer for all DMA channels are serialized, so care is taken to ensure that the maximum cell triggering is below 15 MT/s for a single channel and around 10 MT/s when multiple DMA channels are used to ensure that a high priority channel is not stalling all of the other channels waiting to transfer their data. */ /* DMA is used to transfer data without utilizing the CPU and works in parallel with the CPU and has the ability to access peripherals and non-cached memory on the CPU. However, all cell transfer for all DMA channels are serialized, so care is taken to ensure that the maximum cell triggering is below 15 MT/s for a single channel and around 10 MT/s when multiple DMA channels are used to ensure that a high priority channel is not stalling all of the other channels waiting to transfer their data. */
  
-====== PWM ======+===== PWM =====
 9 PWM channels of the PIC32MZ are implemented on the OpenScope MZ. Two are used in the interleaving of the ADC channels, three are used for offsets for the AWG and both analog input channels, two are used for the DC outputs, and the remaining two used as offsets for the DC outputs.  9 PWM channels of the PIC32MZ are implemented on the OpenScope MZ. Two are used in the interleaving of the ADC channels, three are used for offsets for the AWG and both analog input channels, two are used for the DC outputs, and the remaining two used as offsets for the DC outputs. 
  
 The PWM outputs have 330 unique values ranging from 0 V to 3.3 V, with a step size of 10 mV. The internal clock runs at 100 MHz, providing a PWM frequency of 303 kHz. All of the analog designs on the OpenScope MZ are based on PWM values from 50 to 300 to allow some headroom for calibration.  The PWM outputs have 330 unique values ranging from 0 V to 3.3 V, with a step size of 10 mV. The internal clock runs at 100 MHz, providing a PWM frequency of 303 kHz. All of the analog designs on the OpenScope MZ are based on PWM values from 50 to 300 to allow some headroom for calibration. 
  
-====== Troubleshooting ======+===== Troubleshooting =====
 ====LED Indicators==== ====LED Indicators====
 The LEDs on the OpenScope MZ are used to indicate the current status of the OpenScope MZ hardware as follows: The LEDs on the OpenScope MZ are used to indicate the current status of the OpenScope MZ hardware as follows: