Search the Community

Showing results for tags 'one-shot'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • New Users Introduction
    • Announcements
  • Digilent Technical Forums
    • FPGA
    • Digilent Microcontroller Boards
    • Non-Digilent Microcontrollers
    • Add-on Boards
    • Scopes & Instruments
    • LabVIEW
    • FRC
    • Other
  • General Discussion
    • Project Vault
    • Learn
    • Suggestions & Feedback
    • Buy, Sell, Trade
    • Sales Questions
    • Off Topic
    • Educators
    • Technical Based Off-Topic Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. I have created a soundbox with different sounds connect to different buttons and switches. The switches work fine. High '1' is on, and low '0' is off. I would like my buttons to latch for 3 seconds. I would like to press the button, release it, and have the sound play for 3 seconds. Some call this a one-shot, where a single press latches the bit until unlatched. My code is VHDL in Vivado 2016.4. My board is a BASYS3. I tried using a wait statement, but others have suggested that wait statements do not synthesize. Here is what I have. All help is appreciated. Thanks! period - constance set to 1000ms tempdata - signal std_logic squareout - signal for tone 1 integerout - signal for tone 2 ipcoreout - signal for tone 3 dataout - output from system section of code.... D1: process begin if btn_a = '1' then tempdata <= squareout; wait for 3 * period; elsif btn_b = '1' then tempdata <= integerout; wait for 3 * period; elsif btn_c = '1' then tempdata <= ipcoreout; wait for 3 * period; elsif swt_a = '1' then tempdata <= squareout; wait until swt_a = '0'; elsif swt_b = '1' then tempdata <= integerout; wait until swt_b = '0'; elsif swt_c = '1' then tempdata <= ipcoreout; wait until swt_c = '0'; end if; end process; dataout <= tempdata;