Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to achieve a bigger value of counting in C?

Status
Not open for further replies.

tom_hanks

Full Member level 5
Full Member level 5
Joined
Aug 28, 2003
Messages
243
Helped
14
Reputation
28
Reaction score
1
Trophy points
1,298
Activity points
1,571
hi,

I have two counter in uC...8 bit

now i want to acheive a biggeer value of counting in C...

what is possible way to acheive the bigger value of counting for C & uC...


tom
 

counting in C...

what are these declared as ? int?
make it a long int .
 

Re: counting in C...

i declare it as


volatile unsigned char ms_100_count;
 

Re: counting in C...

Define Array of Char as long as you want then make a function that increament in array
 

Re: counting in C...

declare it as
unsigned long ms_100_count;

so u can count upto 0xFFFFFFFF
 

Re: counting in C...

If you want still bigger declare it as long long type, which is i think 8 bytes long
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top