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 support@ccsinfo.com

calculate speed

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



Joined: 12 Mar 2006
Posts: 20

View user's profile Send private message

calculate speed
PostPosted: Fri Apr 25, 2008 10:09 am     Reply with quote

how can i make my program to wait for 60 seconds then run my specific sub-program? i'm using 4 MHz crystal
horkesley



Joined: 20 Feb 2007
Posts: 48
Location: Essex UK

View user's profile Send private message Send e-mail Visit poster's website

Timer
PostPosted: Fri Apr 25, 2008 10:24 am     Reply with quote

Use timer interrupt to intrrupt every, say 1 second.

Count to 60, that's it.

If you interupt say, 100mS, increment seconds every 10 interrupts.

Do a search on this forum, there was a similar quesion rrecently.

Regars,
_________________
Horkesley Electronics Limited
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Apr 25, 2008 10:40 am     Reply with quote

Quote:
How can i make my program to wait for 60 seconds then run my specific sub-program
Just use the delay_ms() function. Delay for 60000 ms. That's 60 seconds.
Look on the left side of this page. It shows the delay functions in
the CCS compiler:
http://www.ccsinfo.com/content.php?page=compspecific
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