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

How to do a 1ms timer?

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



Joined: 10 Sep 2003
Posts: 60

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger ICQ Number

How to do a 1ms timer?
PostPosted: Tue Apr 05, 2005 11:55 pm     Reply with quote

Currently I'm using PIC16F876 counter to
do timer function for 1 sec, and I set the
decrement number as 76.

So, If I want a timer to count for 1ms only
how should I solve it? Using 0.076 instead
of 76?


Regards: Einly
_________________
Einly
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Wed Apr 06, 2005 3:35 am     Reply with quote

No.
Use the datasheet to calculate exactly what you need to load the timer with to achieve 1ms. It highly depends on your crystal speed.
ckielstra



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

View user's profile Send private message

PostPosted: Wed Apr 06, 2005 4:05 am     Reply with quote

Just a few hours before your post Newguy started a new thread in which he explains all the details on how to set the timers. Try reading it.
Timers - what you should know.
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