Searching \ for '[PIC] fake software interrupts' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ints.htm?key=interrupt
Search entire site for: 'fake software interrupts'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] fake software interrupts'
2009\04\21@041820 by slippyr4

picon face
Is it possible, acceptable, desirable, etc to emulate software interrupts by
programmatically setting an interrupt flag for a hardware feature that's not
being used?

Specifically i'm thinking of doing this on an 18f452. I want to be able to
trigger a low priority interrupt from a high priority ISR, so that the LP
code will run immediately on exit from the HP code.

I've done some googling but haven't found much. I can't think of any nasty
side effects. Anyone else know of any?


thanks

Jon

2009\04\21@043811 by Jinx

face picon face
> Is it possible, acceptable, desirable, etc to emulate software interrupts
> by
> programmatically setting an interrupt flag for a hardware feature that's
> not
> being used?

Can't see anything too wrong with that. After all, the PIC really has no
idea
what caused the IF bit to be set. What you propose happens by accident
anyway. IF is supposed to be cleared by the s/w during the ISR, but if you
forget then it leads to an immediate re-entry. So that's kind of setting it
by
omission

2009\04\21@082620 by olin piclist

face picon face
slippyr4 wrote:
> Is it possible, acceptable, desirable, etc to emulate software
> interrupts by programmatically setting an interrupt flag for a
> hardware feature that's not being used?
>
> Specifically i'm thinking of doing this on an 18f452. I want to be
> able to trigger a low priority interrupt from a high priority ISR, so
> that the LP code will run immediately on exit from the HP code.
>
> I've done some googling but haven't found much. I can't think of any
> nasty side effects. Anyone else know of any?

Yes, you can do this.  However you definitely need to have lots of comments
carefully explaining this unintended use of the interrupt hardware.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

More... (looser matching)
- Last day of these posts
- In 2009 , 2010 only
- Today
- New search...