In this project, a counter from 0 to 99 was implemented using 2 common cathode displays (they can be used as common anodes by modifying the code) which is controlled with a start/stop bit and a reset bit.
Tutorial
Ports used in this project:
- CLK (Input – 1 bit): Clock at 50MHz.
- INI (Input – 1 bit): Input pin to start/stop counting, when INI = ‘1’ starts counting, when INI = ‘0’ the count stops
- RESET (Input – 1 bits): Input pin to reset the count, when RESET = “1” the count is reset.
- DISPLAY(Output – 7 bits): 7-bit port that is connected to the 7-segment display.
- TRANSISTOR(Output – 2 bits): Output port that is connected to the transistors that activate or deactivate the displays.