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

Can someone tell me why this doesn't code work
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
John P



Joined: 17 Sep 2003
Posts: 331

View user's profile Send private message

PostPosted: Mon Nov 28, 2011 2:57 pm     Reply with quote

If you could talk face to face with an experienced person I think you'd get the idea of this in just a few minutes.

Interrupts are launched when conditions are met. There are flags in the processor which tell it which interrupts should be responded to and which should be ignored. If the relevant enabling flag allows a response, the triggering condition could be an elapsed time running out, or it could be an external event like a change on an input pin, or it could be the completion of an analog conversion, or a communication event, or a number of others. You have to decide which ones your program needs. And you have to decide what the interrupt will do in terms of changing the program's operation. So the user presses a button, an interrupt occurs, what should happen? Or a timer triggers, and in the interrupt a counter is increased by 1--but what happens then? Answering those questions is how programmers make a living.
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Mon Nov 28, 2011 3:01 pm     Reply with quote

Quote:

what conditions have to happen for the timer interrupt to be executed?


its all there in the PIC data sheets for each timer

the interrupt service routine for all timers is executed when the overflow flag
is set. for timer0 - it is T0IF

you really do need to spend more time reading the data sheets and looking at example code if you are gonna create circuits and programs that do what you expect.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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