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
basys3:xadcdemo [2015/03/02 00:48] – [Description] Sam Lowebasys3:xadcdemo [2022/10/04 11:38] (current) – external edit 127.0.0.1
Line 2: Line 2:
 ====== Basys3 XADC Demo ====== ====== Basys3 XADC Demo ======
  
-{{ :basys3_overview.png?nolink |}}+{{:basys3:xadc4.jpg?500|}}
  
------ +===== Overview ===== 
-===== Features Used =====+==== Features Used ====
  
 |                                    ^ Not Used  ^ Used  ^ |                                    ^ Not Used  ^ Used  ^
Line 21: Line 21:
  
  
-===== Description =====+==== Description ====
  
 This simple XADC Demo project demonstrates a simple usage of the Basys3's  This simple XADC Demo project demonstrates a simple usage of the Basys3's 
Line 30: Line 30:
   * sw0 and sw1 select which channel to read from    * sw0 and sw1 select which channel to read from 
  
-===== How to Build and Program ===== 
  
-You will need...\\+==== A Note About The XADC Port ====
  
-1. Vivado installed on your computer\\ +On the Basys3, the XADC Pmod connector houses 4 differential analog pairs. The corresponding XADC channels are 6, 7, 14, and 15. Below is a picture of the pinout of the Pmod Header.
-2. Basys3 board from digilent\\ +
-3. Monitor with a VGA port\\ +
-4. VGA cable\\ +
-5. USB mouse\\+
  
 +{{:basys3:xadcpinout1.png?300|}}
  
-==== 1. Download the Project ====+The differential pairs are grouped by columns. Looking at the number above, 1 corresponds to XA1_P and XA1_N, column 2 routes to XA2_P and XA2_N, 3 routes to XA3_P and XA3_N, and 4 routes to XA4_P and XA4_N. Below is from the Basys3 schematics that will show the internal connections of these signals.
  
-Download the project zip file which can be found on the  [[http://digilentinc.com/Products/Detail.cfm?NavPath=2,400,1288&Prod=BASYS3|Basys3 product page.]] Once you have downloaded the project, unzip it in the location of your choosing.+{{:basys3:basys3xadcinternal.png?400|}}
  
-==== 2. Load the Vivado Project ====+From the schematic we can see XA1 is connected to XADC channel 6, XA2 is connected to XADC channel 14, XA3 is connected to XADC channel 7, and XA4 is connected to XADC channel 15. 
  
-In your now unzipped project, open the file basys3_basic_demo.xpr. This should open your project in Vivado. +-------
  
-{{:basys3:gpio_load.png?600|}}+===== Prerequisites =====
  
-==== 3. Synthesize, Implement and Generate Bitstream ====+===Skills=== 
 +  * **Basic familiarity with Vivado** 
 +    *  //This experience can be found by walking through our "Getting Started with Vivado" guide//
  
-To complete this step all that you need to do is click **Generate Bitstream** on the left hand menu towards the bottom. Vivado will run through both Run Synthesis and Run Implementation before it generates the bitstream automatically. If you want, you can click each step by itself in the order of **Run Synthesis**, **Run Implementation** and then **Generate Bitstream**.+===Hardware=== 
 +  * **Basys3 FPGA board** 
 +  * **Micro-USB cable**  
 +  * **Wires and a voltage to measure**
  
-{{:basys3:buildflow.png?600|}}+===Software=== 
 +  * **Vivado Design Suite 2015.X**  
 +    * //Newer/older versions can be used, but the procedure may vary slightly//
  
-==== 4. Connect and Program the Basys3 ====+-----
  
-Once you have generated your bit file, Click on the hardware manager and connect to your board by choosing the local server option.+===== Downloads =====
  
-{{:basys3:device_connected.png?600|}}+Basys 3 Support Repository -- [[https://github.com/Digilent/Basys3/archive/master.zip|ZIP]] [[https://github.com/Digilent/Basys3|GIT Repo]]
  
-After your board is connected, just click program to load the GPIO demo onto your Basys3.+------ 
 +===== How to...  =====
  
-===== Running the Basys3 GPIO Demo =====+==== 1. Generate the Project ====
  
-To run all the features of this demo, you will need the Basys3 board, a monitor with a VGA cable and a USB mouse.+>1.1) Download the repository linked in the download section and place it in the location of your choosing. 
  
-==== 1. Using the Switches with Leds ====+>1.2) Generate the **XADC** project in the Projects folder by following this guide before continuing: [[vivado:github|How to Generate a Project from Digilent's Github]]
  
-For this section, all the switches are tied to their corresponding led. Every time a switch is toggled, the led directly above it will toggle with it.+==== 2. Build the Project ====
  
-{{:basys3:basic_edit.jpg?200|}} {{:basys3:leds_edited.jpg?200|}}+>2.1) Click **Generate Bitstream** on the left hand menu towards the bottom. Vivado will run through both Run Synthesis and Run Implementation before it generates the bitstream automatically.  
 +> 
 +>Note: If you want, you can click each step by itself in the order of **Run Synthesis**, **Run Implementation** and then **Generate Bitstream**. 
 +> 
 +>{{:basys3:buildflow.png?600|}}
  
-==== 2. Using the buttons with The Seven Segment Display ====+==== 3. Program the Board ====
  
-The seven segment display is counting all digits from 0 to 9 when no buttons are pressed. If BTNU is pressed, the first digit on the seven segment display is blacked out. BTNL blacks out the second digit, BTNR blacks out the third, and BTND eliminates the fourth. BTNC blacks out all the digits.+>3.1) Once you have generated your bit file, Click on the hardware manager and connect to your board by choosing the local server option. 
 +> 
 +>{{:basys3:device_connected.png?600|}}
  
 +>3.2) Click program to load the project onto your Basys3.
  
-{{:basys3:btnu_edit.jpg?200|}} {{:basys3:btnr_edit.jpg?200|}} {{:basys3:btnl_edit.jpg?200|}} {{:basys3:btnd.jpg?200|}}+==== 4. Run the Project ====
  
-==== 3. Plugging in a monitor to the VGA port ====+This portion will help you run the demo and observe all its features.
  
-To use the VGA output demo, plug in your monitor to the Basys3 VGA port. The monitor screen will have series of moving patterns as seen below. +>4.1) Applying a voltage to the XADC port 
 +> 
 +>For this demo, the AD6, 7, 14 and 15  pins are used on the JXADC header. We hooked up a signal generator to our pins. All of the other pins were grounded to avoid coupling. 
 +> 
 +>{{:basys3:xadc3.jpg?300|}}{{:basys3:xadc4.jpg?300|}}
  
-{{:basys3:basic_edit.jpg?200|}} {{:basys3:20141030_122816.jpg?200|}} 
  
 +>4.2) Seven Segment Display and LEDs
 +>
 +>The 7-Segment display shows the current voltage across the selected xadc pins. The LEDs turn on from right to left as the input voltage increases.
 +>
 +>{{:basys3:xadc1.jpg?300|}}{{:basys3:xadc2.jpg?300|}}
  
-==== 4. Plugging in and using a USB mouse ==== +>4.3) Selecting a channel 
- +> 
-To see the USB mouse portion of the demo, plug a USB mouse into J2 on the Basys3 with the monitor still connected. On the screen, you should be able to see your mouse pointer and move it around.  +>To display a different channel on the display and LEDs, change sw0 and sw1 to the desired channel.
- +
-==== 5. UART Communication ==== +
- +
-To see the UART communication channel, open a terminal program on your computer set to 9600 baud, 8 data bits, no parity bit and 1 stop bit. On reset or BTNC, the Basys3 will print BASYS3 GPIO/UART DEMO! to the terminal. On a button press other than BTNC, the terminal will print Button press detected! +
- +
- {{:basys3:button_press_terminal.png?600|}}+
  
  
      
-