Interrupts with ICC LMM are "virtually" possible because LMM is a virtual machine that selects the next instruction. The LMM fetch routine can test for hardware pin state changes or variable settings and act accordingly. The latency of the handler routine startup is defined by the number of LMM fetch iterations (typically unrolled at 4). The "interrupt" code PASM runs in a separate COG and LMM just queries the ISR status register at the end of the 4 cycle LMM fetch.
For all intents and purposes, an interrupt handler is really a background "task" that normally pauses execution of the main process to perform work. It is possible given enough memory to have N tasks time-sharing in LMM as is traditionally done with other single core CPUs.
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again BTW: I type as I'm thinking, so please don't take any offence at my writing style
Comments
Not teasing, I've already posted functional code.
See http://forums.parallax.com/showthread.php?p=724559
Interrupts with ICC LMM are "virtually" possible because LMM is a virtual machine that selects the next instruction. The LMM fetch routine can test for hardware pin state changes or variable settings and act accordingly. The latency of the handler routine startup is defined by the number of LMM fetch iterations (typically unrolled at 4). The "interrupt" code PASM runs in a separate COG and LMM just queries the ISR status register at the end of the 4 cycle LMM fetch.
For all intents and purposes, an interrupt handler is really a background "task" that normally pauses execution of the main process to perform work. It is possible given enough memory to have N tasks time-sharing in LMM as is traditionally done with other single core CPUs.
Cheers.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
I just had a quick read and, whilst most of it went right over my head (not hard!), I can see that you've been quite clever Well done.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
www.norfolkhelicopterclub.com
You'll always have as many take-offs as landings, the trick is to be sure you can take-off again
BTW: I type as I'm thinking, so please don't take any offence at my writing style