Jump to content
Sign in to follow this  
chuckj

How Can I Speed Up Interrupt Response?

Recommended Posts

Using BoostC compiler on a PIC18F2420.

I have a very time critical application which requires an interrupt response on the order of 25 clocks.

 

Is there any way to eliminate the saving and restoring of the PROD and FSR0 regs in the interrupt() routine?

This would eliminate about 16 clocks from the routine.

 

Or is there any way to code the entire interrupt() routine in assembly?

 

Thanks,

Chuck

Share this post


Link to post
Share on other sites

I have not tried with the following command line switch to Boost Link:

 

-isrnocontext

 

This option only works with PIC18's. When use this prevents the linker adding

extra code for context saving. This allow the programmer to generate their own

minimal ISR context saving code, or have none at all.

 

There is a bit more description on page 24 of BoostC.pdf version 7 file.

Share this post


Link to post
Share on other sites

Thank you! I did not think to look in the linker options.

The linker option -isrnocontext removes the extra code from the ISRs.

 

Chuck

Share this post


Link to post
Share on other sites

Hi Chuck

 

Don't forget, you don't HAVE to use interrupts, you can simply check the status of the interrupt flags in your main loop.

 

This may actually prove quicker in some circumstances....

 

Tim

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...