Switch Gpio

  1. File | New Project Wizard
  2. name of this project? SwitchGpio
  3. Click on "next"
  4. Click on "next"
  5. Device family: Cyclone V, Devices: Cyclone V SE Mainsteam
  6. Click on 5CSEMA5F31C6, then select "finish"
  7. File | New | Block Diagram/Schematic File
  8. File | Save as SwitchGpio.bdf
  9. Note: Press "Escape" to turn off selected primitive
  10. Click on "Pin Tool" Pin Tool
  11. Select "input", place in center of grid One Inputs
  12. Note: While the input is selected, use the cursor keys to make small adjustments within the grid
  13. Click on "Pin Tool" Pin Tool
  14. Select "output", place in center of grid Two Inputs
  15. Double click on each default name for pin; left one is SW0; right is Pin1
  16. Extend input pin to the left side of output; make sure the connector icon is visable Line Icon
  17. Note: If your connecting line extends too far, click on it, then right click and choose delete; pressing the delete key does not work
  18. Optional: Using the "A" symbol, annotate the grid Annotated Switch GPIO Grid
  19. Click on the Save icon
  20. File | Create/Update | Create HDL Design File from Current File
  21. File Type: VHDL
  22. File | Open "vhd" file just created
  23. File | Create/Update | Create Symbol Files for Current File
  24. Processing | Start Compliation
  25. Choose "Assignments | Pin Planner"
  26. Using the values above, select the proper locations for each pin Switch Gpio Layout
    1. SW0: LOC PIN_AB12
    2. Pin1: LOC Pin_AC18
  27. Close out Pin Assignment module
  28. Tools | Programmer
  29. Click on "Auto Detect"; select 5CSEMA5 and click "OK"
  30. Double click on 5CSEMA5, select SOF from output_files
  31. Click on "Program/Configure"; click on "Start"

Results of downloading and observing the GPIO 0 [pin 1] with an Osilloscope with the switch off, Voltage 0switch0 is off
Here the SW0 is on, Voltage around 3.5 Switch0 is on

Results, shown by O-Scope, switching SW0 on and off

Return to Projects Section