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

how To use FAST interupt handeling CCS

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



Joined: 19 Jan 2004
Posts: 5

View user's profile Send private message Send e-mail

how To use FAST interupt handeling CCS
PostPosted: Wed Jan 21, 2004 5:03 am     Reply with quote

Hi there,

I using the CSS compiler, with the PIC 16F876A at 8Mhz
The problem is my interupt handeling (status saving) is to slow.
Now i read in the manual something about FAST Int handeling.

Is someone familiar with this, and how to do the trick?.

Thanks

Frans.n
Felix Althaus



Joined: 09 Sep 2003
Posts: 67
Location: Winterthur, Switzerland

View user's profile Send private message

PostPosted: Wed Jan 21, 2004 5:22 am     Reply with quote

What do you have to do in your interrupt service routine?

mfg
Felix
Frans



Joined: 19 Jan 2004
Posts: 5

View user's profile Send private message Send e-mail

PostPosted: Wed Jan 21, 2004 5:34 am     Reply with quote

it's an Uart Int handeling at 200000 baud. it's critical up now.

Frans
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Wed Jan 21, 2004 7:03 am     Reply with quote

You are referring to high/low priorty interrupts which are available on the PIC18's. You are probably trying to do too much in your interrupt handler. Post your isr and we can recommend possibly a better way of doing it.
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Wed Jan 21, 2004 9:44 am     Reply with quote

Frans wrote:
it's an Uart Int handeling at 200000 baud. it's critical up now.

Frans


You should use a RTS and DTR line to make this work. 200K baud is very fast specialy with an 8Mhz oscilator. If you stay in the interupt the entire time you are recieving it may work. When the RST line from the PC comes on it should cause a interupt on pin B0. Once within the interupt function set the DTR line and the PC will beging sending data.
Ttelmah
Guest







Re: how To use FAST interupt handeling CCS
PostPosted: Wed Jan 21, 2004 11:05 am     Reply with quote

Frans wrote:
Hi there,

I using the CSS compiler, with the PIC 16F876A at 8Mhz
The problem is my interupt handeling (status saving) is to slow.
Now i read in the manual something about FAST Int handeling.

Is someone familiar with this, and how to do the trick?.

Thanks

Frans.n

The 16F family, does not support 'fast' interrupts.
Basically, there are two seperate control functions. The first is 'priority', which allows you to specify which order the code will check interrupts. This works with any chip version.
The second is 'fast', which can only be used on chips that support hardware interrupt priorities (the 18F etc.). This has significant 'issues' on some chips.
Now, you can generate quite 'fast' interrupt handling, using 'trick' code. If you replace the INT_GLOBAL routine, save just the BSR, STATUS, and W registers, then check for your 'important' interrupt, and jump to it's handler, _provided_ this handler is kept simple (no use of table pointers, subroutines etc.), you can execute this routine, and simply exit restoring just these three registers. You can approximately halve the overhead associated with the normal handler this way, _but_, only if you are very careful in the code for the handler. The int_global, if necessary, can then save other registers (the SCRATCH area, and table pointers), and check for other interrupts.

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