element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Blog Use Xilinx Analog-to-Digital (XADC) with breadboardable Spartan 7 FPGA module
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: alexwonglik1
  • Date Created: 19 Aug 2021 6:24 AM Date Created
  • Views 2797 views
  • Likes 7 likes
  • Comments 0 comments
  • analog-to-digital
  • spartan 7
  • voltage:
  • cmod
  • s7
  • project
  • putty
  • fpga kit
  • xilinx
  • fpga
  • vivado project
  • vivado
  • embedded
  • digilent
  • adc
  • c-programming
  • fpga basics
  • c programing language
  • analog
  • xadc
  • cmod s7
  • sdk
Related
Recommended

Use Xilinx Analog-to-Digital (XADC) with breadboardable Spartan 7 FPGA module

alexwonglik1
alexwonglik1
19 Aug 2021

In this example project, you will learn how to use the Cmod S7-25's Spartan 7 FPGA's analog-to-digital core with a Microblaze processor. Xilinx Vivado 2018.2 SDK is used to program the bitstream onto the board and to build and deploy a C application.

 

Digilent Cmod S7Digilent Cmod S7 is a small, 48-pin DIP form factor board, populated with 36 pins, built around a XilinxRegistered SpartanRegistered-7 FPGA that brings FPGA power and prototyping to a solderless breadboard. The board includes a Quad-SPI flash for programming, as well as a USB-JTAG programming circuit and USB-UART bridge. The Cmod S7 also features a clock source, Pmod port, and onboard I/O with LEDs and pushbuttons.

image

Digilent Cmod S7

 

 

Import the example project in Xilinx Vivado

 

Firstly, you need to download and extract ZIP archive ("Cmod-S7-25-XADC-2018.2-*.zip"). After you open the XPR project file in Vivado 2018.2, you export the hardware and launch the SDK. Then, you can create a new Application Project and import the ready-to-run application program:

 

In the "Select an import wizard" pane of the window that pops up, expand General and select File System. Fill out the fields of the "File system" screen as in the table below. Most of the listed values will be the defaults but are included in the table for completeness.

 

SettingValue
From directory<archive extracted location>/sdk_appsrc
Files to import pane: sdk_appsrcChecked box
Into folderCmod-S7-25-XADC/src
Options: Overwrite existing resources without warningChecked box
Options: Create top-level folderUnchecked box

 

Program the hardware and launch the application

 

Once you connect a test circuit to the Cmod S7-25's analog input pins, you can open a serial terminal, e.g. TeraTerm. Then, you can connect the terminal to the Cmod S7's serial port and choose baud rate of 9600.

In Xilinx SDK, you select Xilinx -> Program FPGA and do not change any field. In the Project Explorer pane, right-click on the "Cmod-S7-25-XADC" application project and select "Run As -> Launch on Hardware (System Debugger)". The application will now be running on the Cmod S7.

 

Run the demonstration

 

As long as the demo is running, ten times per second, the voltages on each of the Cmod S7-25's DIP header's analog input pins (AIN32 and AIN33) are read and printed to a connected serial terminal. The readings are accurate to two decimal places. Take care not to apply a voltage greater than 3.5 Volts to the analog pins. Any voltages less than 0 Volts or greater than 3.3 Volts are read as those instead.

 

The project source files and step-by-step guidelines are available on the Digilent GitHub Page

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube