interrupt handler in pymite

58 views
Skip to first unread message

black_13

unread,
Jun 22, 2010, 9:04:19 AM6/22/10
to python-on-a-chip
can interrupts be handled by pymite code?
black_13

Dean Hall

unread,
Jun 22, 2010, 9:26:06 AM6/22/10
to python-o...@googlegroups.com
No, not as-is.

But it would be possible to have an interrupt service routine set a
flag in a C variable that is monitored by the VM. So that the VM
notices the flag when it goes to execute the very next bytecode.
However, some bytecodes are hundreds and thousands of clock cycles...
especially for native function calls and bytecodes where memory may be
allocated (and the GC may run).

So if you have time-sensitive processing, do it in C/assembly.

!!Dean


On Jun 22, 2010, at 08:04 , black_13 wrote:

> can interrupts be handled by pymite code?
> black_13
>

> --
> You are subscribed to the "python-on-a-chip" (or p14p for short)
> Google Group.
> Site: http://groups.google.com/group/python-on-a-chip

Reply all
Reply to author
Forward
0 new messages