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

about int_timer1 on 16F876

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



Joined: 28 Apr 2004
Posts: 18

View user's profile Send private message

about int_timer1 on 16F876
PostPosted: Fri Apr 30, 2004 8:59 am     Reply with quote

is the timer interrupt on every overflow or when he's finished timing?
i have to sample with this expression:

for (i=1, i<=800, i++)
setup_timer_1(T1_internal|T1_div_by_4); //overflow 400µs and ntrpt3ms
enable_interrupts(int_timer1);
enable_interrupts(global);

so what is the solution if i want to interrupts every 200µs during 3s?
plz help me...
_________________
nfs
Haplo



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

View user's profile Send private message

PostPosted: Fri Apr 30, 2004 7:28 pm     Reply with quote

Looks like

Code:
setup_timer_1(T1_internal|T1_div_by_2); //overflow 200µs
enable_interrupts(int_timer1);
enable_interrupts(global);


should work. You can disable the interrupts after the 3 second period. What is the purpose of the for statement?
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