piclist 2005\01\03\143629a
>
Thread:
What to save in MCC18 interrupts?
www.piclist.com/techref/microchip/ints.htm?key=interrupt
BY
:
email (remove spam text)(Olin Lathrop)
Harold Hallikainen wrote:
> I'm having some trouble that I THINK is due to interrupts smashing data
> in an MCC18 project with prioritized interrupts. The interrupt code is
> all written in assembly with the exception of the C code that calls it
> (below).
That seems silly. If all the logic is in assembler, why do you need to
create a C stub to call it? Interrupt code generally needs to be
responsive, so you want to minimize cycles. At best the compiler won't put
a lot of needless bloat in there. Interrupt entry and exit is well
understood, and the compiler isn't going to come up with some magic
optimization that the standard assembler entry/exit code doesn't already do.
For a ready PIC 18 interrupt template, see my QQQ_INTR18.ASPIC module at
http://www.embedinc.com/pic. You select a few things at the top with EQUs,
and the appropriate template code gets selected. This includes a choice of
single or high/low priority interrupts. All you have to do is insert the
actual interrupt handling code. I've used this a bunch of times.
*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com
<000b01c4f1cb$7450e450$780010ac@radianse.com> 7bit
See also: www.piclist.com/techref/microchip/ints.htm?key=interrupt
Reply
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the
piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
month overview.
new search...