CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

digital clock count

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
wakaka



Joined: 11 Sep 2006
Posts: 27

View user's profile Send private message

digital clock count
PostPosted: Sun Mar 11, 2007 7:40 am     Reply with quote

Hi all, i would like to use PIC16F876a to build a simple digital clock.

Below is partial of the code :

Code:
for(i=0; i <= X; i++) {
   
         delay_ms(1000)
         clock = clock +1;
                                         }
                               


The problem is what is the maximum value for X that CCS are supported. If according to calculation, 1 day consist of 86400 seconds. If i divide the Should i put X = 86400? or should i break in to for loops?
Plz guide, thanks.
jecottrell



Joined: 16 Jan 2005
Posts: 559
Location: Tucson, AZ

View user's profile Send private message

PostPosted: Sun Mar 11, 2007 8:56 am     Reply with quote

Look at the following link:

http://www.ccsinfo.com/forum/viewtopic.php?t=26177

I use this code whenever I need an RTC and I haven't included an RTC IC.

Look at the compiler manual and read about the data types. You will see what the largest is.

Good luck,

John
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group