Build a Digital Sensor SoC

The on-board Pmod expansion port, labeled "JXADC", is wired to the auxiliary analog input pins of the FPGA. Depending on the configuration, this connector can be used to input differential analog signals to the analog-todigital converter inside the Artix-7 (XADC). Any or all pairs in the connector can be configured either as analog input or digital input-output. The Dual Analog/Digital Pmod on the Basys 3 differs from the rest in the routing of its traces. The eight data signals are grouped into four pairs, with the pairs routed closely coupled for better analog noise immunity.

The XADC core within the Artix-7 is a dual channel 12-bit analog-to-digital converter capable of operating at 1 MSPS. Either channel can be driven by any of the auxiliary analog input pairs connected to the JXADC header.



From the constraint file, you can see that only the auxiliary porst 6, 7, 14, 15 are connected to the headers. Note that the Artix-7 chips has 16 auxiliary ADC channels (can be used as general I/O pins) and one additional dedicated analog input pair Vp/Vn.



Here are the explanations



The Github demo code uses an IP generated by the wizard. It is a good example to see how to instantiate it in verilog.



There are some configuration registers that need to be set up. In the wizard-created IP, I found it looks like this:



From the user guide, you can find more information about it:



The Arduino chip SPI Control Register



An example about how to configure registers with the ATMega chip




Use a potentiometer to replace the analog amplifier.
The analog signal from the potentiometer is digitized by the ADC, then connect the digital signal to the input of the SPI port. Use the 5V/3.3V level shifter in beteween the Basys3 and the Arduino SPI ports. Finally using Arduino to send the signal to the serial monitor for display.








Reference:
1. 7 series FPGAs XADC 12-it 1MSPS ADC user guide
2. ATMega 328p MCU datasheet
3. High speed level shifter
4. Basys 3 XADC demo