[SOLVED] 0-99 counter C program for AT89C51

Status
Not open for further replies.

ambar686

Junior Member level 1
Joined
Sep 1, 2013
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
Dankuni, India, India
Visit site
Activity points
128
Hi,
Can anyone give me the C code for a 0-99 counter for AT89C51 microcontroller? It is very urgent. Thanks in advance. :?::|
 

Re: 0-99 counter C program for AT89C51

Sorry, but why are u using a so old device?
Anyway, a counter is simple, if u wont, a cycle (for, while... as you prefer).

Code:
unsigned int count=0;

while(count<100) count++;

or

Code:
unsigned int count;

for(count=0;count<100;count++){//do something?}

Which kind of compiler do you use? This count is for what? Maybe a 7seg display connected at some port?
 
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…