Shop OBEX P1 Docs P2 Docs Learn Events
BS2p-40 Questions — Parallax Forums

BS2p-40 Questions

ArchiverArchiver Posts: 46,084
edited 2001-04-30 12:23 in General Discussion
Hi everyone,

Please can I pick your brains?

The interrupts on the BS2p-40, can they be assigned to any I/O?

If an interrupt is detected can it run a routine within the current
program slot or does it have to jump to a new slot? If you are
polling to see if a machine guard is opened, do you really have to
jump to a new program slot just to carry our the necessary stop
routines. Then you have to go and restart the original program again
and try and get back to where you were?

thanks for the help

Jon

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-04-30 12:23
    [font=arial,helvetica]In a message dated 4/30/01 6:18:50 AM Central Daylight Time, jonm@pseal.co.uk
    writes:


    The interrupts on the BS2p-40, can they be assigned to any I/O?



    Yes.

    If an interrupt is detected can it run a routine within the current
    program slot or does it have to jump to a new slot? ·If you are
    polling to see if a machine guard is opened, do you really have to
    jump to a new program slot just to carry our the necessary stop
    routines. ·Then you have to go and restart the original program again
    and try and get back to where you were?



    As far as automatic operation, you can do a PRUN which will cause the Stamp
    to run another program slot. ·Unfortunately, there is not PGOTO or PGOSUB.

    If you design your code to run as a task switcher, you may find that you can
    get the performance you want. ·In the "main" section (the code that actaully
    calls each task in order [noparse][[/noparse]using BRANCH]), you can check to see if your
    polled-pin was active recently (be sure to use a PMODE that latches the pin)
    and take action accordingly.

    HTH

    -- Jon Williams
    -- Dallas, TX

    [/font]
Sign In or Register to comment.