Analyzing DAC, ADC, and SPI Data with the Analog Discovery Studio

 

The Analog Discovery StudioAnalog Discovery Studio functions as a mixed-signal oscilloscope. In this demo, we use several instruments in Analog Discovery Studio.

 

  1. Oscilloscope - view analog data from a resistor ladder Digital to Analog Converter (DAC)
  2. Logic Analyzer - view and decode an ADC's SPI bus
  3. Waveform Generator - stimulate the ADC's analog inputs

 

The Cmod S7Cmod S7 , Xilinx Spartan 7 Breadboardable Module, 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 R2RPmod R2R, and to control and capture data from the SPI module implemented in the Cmod S7's FPGA.

 

Inventory for this project:

 

 

Operating the Demo

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 StaticIO instrument. When changing the SPI mode, make sure to also modify the Active and Sample settings of the SPI bus in the Scope 1 pane.

 

The RESET button and ENABLE switch in the StaticIO instrument are used to control the SPI module programmed into the Cmod S7, resetting the module, and enabling/disabling it, respectively.

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.

 

 

 

Read more on how to implement the project on the Digilent Blog.

https://reference.digilentinc.com/reference/instrumentation/analog-discovery-studio/cmod-s7-demo