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

Regarding Interrupt service routine(ISR).......

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



Joined: 21 Apr 2009
Posts: 3

View user's profile Send private message

Regarding Interrupt service routine(ISR).......
PostPosted: Mon May 11, 2009 6:30 am     Reply with quote

hello,

I'm new to PIC and i'm using 18f452 controller..I want to write program using ISR for fast execution...so please can anyone help me how to program..what r the steps to program...?

thanx in advance..
pradeep
Ttelmah
Guest







PostPosted: Mon May 11, 2009 8:21 am     Reply with quote

No 'simple' steps.

The answer, will depend on whether you have any other interrupts in use, and what your code needs to do in the ISR.

The 'standard' ISR handler, perhaps doubles the overhead from the 'best case', but the latter requires _you_ to have learnt enough about the chip, to know exactly what registers are used inside the ISR.

If no other interrupts are in use, look at the example 'ex_glint.c', which shows the fastest way on a PIC16. On the PIC18, this can be improved a little, by using the RETFIE 1 instruction, but the basic format, remains correct. This example, only uses the minimum registers, and anything more complex, will require manual saving of more registers than this.

This is not something to do, if you are 'new to the PIC'. You need to read and understand the data sheet, and do a search here about interrupt handlers. More complex examples have been posted, showing how things have to expand for more than one interrupt, and for more registers.
Think of this like some quite complex piece of off-road driving. You need to learn how to actually drive _first_...

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