Spectre90
Newbie level 6
- Joined
- Nov 15, 2014
- Messages
- 11
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 85
Ok I know this might sound stupid and maybe easy, but I want to make a module in verilog that each time I press button and release once, the output will be either binary: 00,01,10,11,00,01...etc.
Basically I want to make count up once each time I press the button.
When I attempted to code it, I kept counting continuously when I press on the button. I want to press it as long as I want and the output should be only whatever comes next once
Example:
It's starts at 00
I press it for 2 seconds then release, the output will be 01, then I press for 5 seconds then release, output should be 10 and same with last one for x amount of time.
I'm guessing I need a clock and active low button trigger and also take deboucing.
Note: I have made a clock divider module to lower the board's frequency from 50Mhz to whatever Hz (made a parameter to calibrate).
Basically I want to make count up once each time I press the button.
When I attempted to code it, I kept counting continuously when I press on the button. I want to press it as long as I want and the output should be only whatever comes next once
Example:
It's starts at 00
I press it for 2 seconds then release, the output will be 01, then I press for 5 seconds then release, output should be 10 and same with last one for x amount of time.
I'm guessing I need a clock and active low button trigger and also take deboucing.
Note: I have made a clock divider module to lower the board's frequency from 50Mhz to whatever Hz (made a parameter to calibrate).