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

delay_ms() question

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



Joined: 18 Oct 2004
Posts: 21

View user's profile Send private message

delay_ms() question
PostPosted: Thu May 12, 2005 11:05 am     Reply with quote

What timer module does delay_ms command uses?

Thanks.
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Thu May 12, 2005 11:16 am     Reply with quote

No timers are used by the delay-functions. Timing is based on the number of instructions in a for-next-loop. The exact number of instructions in the loop is determined at compile time and depends on the clock frequency you specified in the #delay statement.
DragonPIC



Joined: 11 Nov 2003
Posts: 118

View user's profile Send private message

PostPosted: Thu May 12, 2005 11:29 am     Reply with quote

Yep, no OS or anything with this compiler. Just counting instruction cycles.
_________________
-Matt
valemike
Guest







PostPosted: Thu May 12, 2005 1:26 pm     Reply with quote

Furthermore, since they are 'software' time delays, then if you want to delay_ms(5), you are guaranteed at least 5 ms of delay. If interrupts hit and you service them, then this adds on to your 5 ms. That's why i say "at least"
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