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

Help needed on Interrupt Latency

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



Joined: 24 Jul 2009
Posts: 21

View user's profile Send private message

Help needed on Interrupt Latency
PostPosted: Fri Aug 28, 2009 4:25 am     Reply with quote

While writing code in CCs c interrupt Latency is more compared to Assembly???

How could i reduce Interrupt Latency???
which all factors affect interrupt Latency???

Help needed for pic16.......

How much time will take if device is in sleep for servicing ISR???
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Aug 28, 2009 1:46 pm     Reply with quote

This thread has an explanation of the code in the CCS interrupt handler:
http://www.ccsinfo.com/forum/viewtopic.php?t=29173

You can make your own interrupt handler by using #INT_GLOBAL.
See Ttelmah's example at the end of this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=39309

But, this is an advanced topic. If you are a beginner, you should learn
more before trying this.
Ttelmah
Guest







PostPosted: Sat Aug 29, 2009 5:08 am     Reply with quote

Some other comments:
The question about 'sleep', depends on a lot of factors. First, remember you don't 'need' an ISR. If you have the global interrupt flag disabled, and the interrupt you want to wake up enabled, then go to sleep, the chip wll awaken, on the interrupt, and execute the next instruction. No 'interrupt latency' at all in this sense. Rememebr also though that this following instruction will have been 'pre-fetched' before sleeping, so should not be anything like a value test etc. (nop is the safest thing).
However you then need to look at the actual 'wake up' time. This will depend on your hardware. If (for instance), you are running with the internal oscillator driving a crystal, the chip will not wake up, till the clock is stable. On most chips, 1024 cycles of the lock is allowed for this!..... Far more than the interrupt latency. This delay is only present, in XT, HS or LP oscillator modes. If instead you run with an external clock, and use the EC mode, wake up will be almost instantaneous.

Best Wishes
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