Shop OBEX P1 Docs P2 Docs Learn Events
help for a stamp-based coin-op machine — Parallax Forums

help for a stamp-based coin-op machine

ArchiverArchiver Posts: 46,084
edited 2003-05-30 04:59 in General Discussion
I'm working on a coin-op machine which uses a BS-2SX as its brain.
When the appropriate amount of quarters are deposited (the coinswitch
is wired to an input lead), it starts a 60-second show for the
customer. I need the Stamp to recognize coin-drops even when the
'show' is underway. Is there any way to have some process running in
the background to increment the quarters_deposited variable, no matter
what else the machine is doing?
Or do I need to switch to a different stamp to accomplish this?

thanks
--Alex

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-05-29 20:54
    You *may* be able to do it with one BASIC Stamp, but it will require some
    fairly-tricky programming. It might be easier to use a slave Stamp to handle
    the
    coins, then a master to deal with the show. This is assuming that
    controlling the show is a dynamic process and requires the main Stamp's
    attention while
    running.

    -- Jon Williams
    -- Parallax

    In a message dated 5/29/2003 11:37:34 AM Central Standard Time,
    atl_guy1138@y... writes:

    > I'm working on a coin-op machine which uses a BS-2SX as its brain.
    > When the appropriate amount of quarters are deposited (the coinswitch
    > is wired to an input lead), it starts a 60-second show for the
    > customer. I need the Stamp to recognize coin-drops even when the
    > 'show' is underway. Is there any way to have some process running in
    > the background to increment the quarters_deposited variable, no matter
    > what else the machine is doing?
    > Or do I need to switch to a different stamp to accomplish this?
    >
    > thanks
    > --Alex



    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-05-30 04:59
    I kind of agree with JW - you could do some sort of polling
    scheme/branch to subroutine for your coin input but the timing would
    be a nightmare. A stamp simply can't multitask.

    I'd go with a seperate coin counter chip (another stamp or whatever)
    which you could check every so often when convenient within the
    code. Perhaps you could even use something as simple as a 40 cent
    generic 74XX counter IC?

    --- In basicstamps@yahoogroups.com, "atl_guy1138" <atl_guy1138@y...>
    wrote:
    > I'm working on a coin-op machine which uses a BS-2SX as its brain.
    > When the appropriate amount of quarters are deposited (the
    coinswitch
    > is wired to an input lead), it starts a 60-second show for the
    > customer. I need the Stamp to recognize coin-drops even when the
    > 'show' is underway. Is there any way to have some process running
    in
    > the background to increment the quarters_deposited variable, no
    matter
    > what else the machine is doing?
    > Or do I need to switch to a different stamp to accomplish this?
    >
    > thanks
    > --Alex
Sign In or Register to comment.