I need help with proteus

Thread Starter

RedMoon

Joined Dec 4, 2024
1
I am designing a 2-digit ascending counter with a RAM and a button in Proteus. Here's the functionality I want to implement:

When the button is pressed for the first time, the current counter output should be saved in the RAM at address 0.

When the button is pressed for the second time, the current counter output should be saved in the RAM at address 1.

When the button is pressed for the third time, the current counter output should be saved in the RAM at address 2.

When the button is pressed for the fourth time, the current counter output should be saved in the RAM at address 3.
 

David1111111

Joined Aug 25, 2021
4
I once came across a similar case. That case was based on the 51 single-chip microcomputer and combined C language programming with Proteus simulation to achieve the function of a simple button counter. Although it's a bit different from the two-digit ascending counter you need, there are still some things you can learn from it.

For example, you can refer to its programming part. You can add the code for detecting the level change of the pin connected to the button in the main program loop. When it detects that the button is pressed, first check whether the current value of the counter is less than 99. If it is, then add 1 to the value of the counter.
 
Top