Shop OBEX P1 Docs P2 Docs Learn Events
Does stamp 2 have interrupts? — Parallax Forums

Does stamp 2 have interrupts?

John998John998 Posts: 7
edited 2006-10-16 17:42 in BASIC Stamp
Does stamp 2 have software interrupts routines?· If yes, where can I find more information about them on how to setup and use.· Thanks

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2006-10-16 15:54
    No. The BS2 is a single-tasking processor, with no user accessible interrupts.
  • John998John998 Posts: 7
    edited 2006-10-16 15:57
    Thanks, i didn't think so. but just to confirm it.
  • Mike GreenMike Green Posts: 23,101
    edited 2006-10-16 15:57
    No. None of the Stamps have interrupts. The BS2p series (p/pe/px) have what's called POLLMODE where the interpreter checks I/O pins for a user specified status between interpretive instructions for faster response to some conditions, but it's not an interrupt capability.

    Interrupts and interrupt programming is often overrated. What are you trying to accomplish?
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-10-16 16:04
    Sure, you can 'kick' out of code when a user wants something done.

    Typically this is done with a 'timeout' on a SERIN statement. You can also check the state of a pin (to which you've attached a switch) and 'jump' or 'gosub' to a handler routine.
  • John998John998 Posts: 7
    edited 2006-10-16 16:40
    Thanks for your help allanlane5.
  • BeanBean Posts: 8,129
    edited 2006-10-16 17:42
    John,
    You might want to look at the SX programmed in SX/B (BASIC).
    It fully supports interrupts.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com

    Don't mistake experience for intelligence. And vis-vera.
    ·
Sign In or Register to comment.