Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
test-and-measurement:analog-discovery-studio:cmod-s7-demo [2022/07/25 18:18] – [Operating the Demo] Arthur Brown | test-and-measurement:analog-discovery-studio:cmod-s7-demo [2022/09/12 19:43] (current) – changed forum.digilentinc.com to forum.digilent.com Jeffrey | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Analyzing DAC, ADC, and SPI Data with the Analog Discovery Studio ====== | ||
+ | {{ reference: | ||
+ | |||
+ | ==== Overview ==== | ||
+ | |||
+ | The Analog Discovery Studio functions as a mixed signal oscilloscope, | ||
+ | |||
+ | ---- | ||
+ | |||
+ | <WRAP group>< | ||
+ | The FPGA on the Cmod S7 (a Xilinx Spartan 7 chip) is used in this project to implement a SPI master module, repeatedly sending data captured by the FPGA's onboard two-channel analog-to-digital converter (ADC). This data is also sent to the Pmod R2R, a resistor ladder digital-to-analog converter (DAC), to be converted back to analog data. The Analog Discovery Studio is used to provide analog signals to the Cmod S7's analog input pins, capture analog voltages from the Pmod R2R, and to control and capture data from the SPI module implemented in the Cmod S7's FPGA. | ||
+ | |||
+ | The block diagram to the right illustrates how data moves through the demo. | ||
+ | </ | ||
+ | {{ reference: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | ==== Inventory ==== | ||
+ | * [[https:// | ||
+ | * Breadboard Canvas | ||
+ | * MTE Cables | ||
+ | * Power Supply | ||
+ | * USB A to B Cable for connection to host computer | ||
+ | * [[https:// | ||
+ | * MicroUSB Cable for programming and power | ||
+ | * [[https:// | ||
+ | * Computer with the following software installed: | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * Demo Archive, including WaveForms workspace, and Cmod S7 bit file. | ||
+ | * {{ https:// | ||
+ | |||
+ | ---- | ||
+ | ==== Demo Setup ==== | ||
+ | |||
+ | === Hardware Setup === | ||
+ | |||
+ | 1. Attach the Cmod S7 to the breadboard. | ||
+ | |||
+ | 2. Connect the following pins of the Cmod S7 to the respective pins of the Analog Discovery Studio using the MTE Cables, as in the table below. | ||
+ | |||
+ | ^ Cmod S7 Pin ^ Analog Discovery Studio Pin ^ MTE Cable Color | | ||
+ | | AIN 32 | Wavegen W1 | Yellow | | ||
+ | | AIN 33 | Wavegen W2 | Yellow with White Stripes | | ||
+ | | PIO 1 | DIO 0 | Pink | | ||
+ | | PIO 2 | DIO 1 | Green | | ||
+ | | PIO 3 | DIO 2 | Purple | | ||
+ | | PIO 4 | DIO 3 | Brown | | ||
+ | | PIO 45 | DIO 4 | Pink | | ||
+ | | PIO 46 | DIO 5 | Green | | ||
+ | | PIO 47 | DIO 6 | Purple | | ||
+ | | PIO 48 | DIO 7 | Brown | | ||
+ | | Ground | Ground | Black | | ||
+ | |||
+ | 3. Plug the Pmod R2R into the Cmod S7's Pmod Port, then connect the following pins of the Pmod R2R to the respective pins of the Analog Discovery Studio, as in the table below. | ||
+ | |||
+ | ^ Pmod R2R Pin ^ Analog Discovery Studio Pin ^ MTE Cable Color | | ||
+ | | VOUT | Scope 1+ | Orange | | ||
+ | | GND | Ground, Scope 1- | Black, Orange with White Stripes | | ||
+ | |||
+ | 4. Plug the Cmod S7 into the Analog Discovery Studio' | ||
+ | |||
+ | 5. Connect the Analog Discovery Studio to the host computer using the USB A to B cable. | ||
+ | |||
+ | 6. Plug in the Analog Discovery Studio to wall power. Flip its power switch to turn it on. | ||
+ | |||
+ | ---- | ||
+ | === Software Setup === | ||
+ | |||
+ | 1. Download and extract the demo files: {{ https:// | ||
+ | |||
+ | 2. Open Adept, and connect to the Cmod S7. Under the **Config** tab, click **Browse**, then navigate to the file " | ||
+ | |||
+ | **Note:** // | ||
+ | |||
+ | **Note:** //The full Vivado project used in this demo, written primarily in Verilog, is hosted on Github in this [[https:// | ||
+ | |||
+ | 3. Open WaveForms, then open the workspace, " | ||
+ | |||
+ | 4. To begin applying analog signals to the Cmod S7's analog input pins, capturing analog data from the R2R VOUT pin, and capturing SPI transactions generated by the Cmod S7, click the **Run** button in the //Scope 1// and //Wavegen 1// panes. | ||
+ | |||
+ | ---- | ||
+ | ==== Operating the Demo ==== | ||
+ | <WRAP group>< | ||
+ | The analog signals generated on the Wavegen pins can be modified by changing the configurations of each channel in the //Wavegen 1// pane. By default, channel 1 is set to output 0 Volts DC, and channel 2 is set to ramp from 0 to 3 Volts over 200 microseconds. These waveforms can be seen in the sequence output by the Cmod S7 in the //Scope 1// pane. Both the SPI module and the R2R alternate between outputting data captured from channel 1 and channel 2, switching the channel every 20 microseconds. | ||
+ | |||
+ | By default, the demo uses SPI mode 0. This can be changed by changing the state of the CPOL and CPHA buttons in the // | ||
+ | |||
+ | The RESET button and ENABLE switch in the // | ||
+ | |||
+ | In the //Scope 1// instrument, the yellow plot line, Channel 1, represents voltage data captured from Scope channel 1. The red plot line, Math 1, represents the data transferred over SPI from the Cmod S7, converted into voltage from raw 8-bit digital samples. | ||
+ | </ | ||
+ | {{ reference: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | ==== Final Notes ==== | ||
+ | |||
+ | For more guides and example projects for your Analog Discovery Studio, please visit its [[test-and-measurement: | ||
+ | |||
+ | For more information about how to use the other Digilent products featured in this demo, please visit their respective Resource Centers: [[programmable-logic: | ||
+ | |||
+ | For technical support, please visit the [[https:// | ||
+ | |||
+ | {{tag> | ||
+ |