digital counter using 8051

Status
Not open for further replies.

burassu

Junior Member level 1
Joined
Jul 2, 2011
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,391
Hi I am doing an up down digital counter , the counter should count from 0 to 30 . I know how to increment and decrement. but the problem is I have to increment/ decrement the units alone than the tens and then display them on an lcd. How can I do It pls ???
 


First you have to draw a flowchart (see attached example) of what you have to do, including all conditions such as what happens when you decrease a number and the unit count is 0, or when you increase a number and the unit count is 9 ..
To count units use, for example, register R2, to count tens use R3.

Once you have a flowchart translating it to the 8051 code is not a major problem.

:wink:
IanP
 

Attachments

  • an35-flowchart-example.jpg
    43.6 KB · Views: 58
Last edited:

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…