Shop OBEX P1 Docs P2 Docs Learn Events
Pinball machine interfacing question — Parallax Forums

Pinball machine interfacing question

bongkbongk Posts: 14
edited 2011-02-08 10:15 in Propeller 1
I'm building a circuit to sense the data going into a bally 6-digit pinball display and feed it to a Propeller instead.

Details of how the displays work can be found here: http://stevekulpa.net/pinball/bally_disp6.htm

In short, the signal is fed over over 11 lines. 6 of the lines are used to indicate which one of the 6 digits is getting updated. 4 of the lines send the number in binary coded decimal. The last line is the "strobe". When the data is set up on the other 10 lines, the last line is strobed to latch the data onto that digit of the display (kind of like a parallel shift register).

My question: Will the Prop be fast enough if I have a cog watch for the strobe signal and then read the 10 data lines, or is it likely the duration of a strobe event will be too short to do this? The signals are generated from a Bally MPU board that runs at I think 1MHz. Normally the signal is fed into a 4543B BCD to 7segment latch decoder, which lists its minimum LD pulse width at 125ns.

I think my other option would be to have the strobe signal latch the data into a parallel shift register, but I'd much rather read them right into the Prop if I can. (There are actually 5 different strobe lines, one for each display.)

I don't have a 'scope to tell me the duration of the strobe signal.

Thanks in advance for your help.
Kevin

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2011-02-07 21:02
    bongk: Welcome to the forum. IIRC OBC (OldBitCollector) has a pinball machine running with a prop. There is a thread about it or see his website (look for his signature in one of his posts).

    Fron what you describe, I would think the prop would handle it (assuming 125ns strobe width) using pasm but spin will not likely get there.
  • wmosscropwmosscrop Posts: 409
    edited 2011-02-07 22:40
    For that vintage of machines (6 digit display), PASM should have no problems detecting the pulse, which I'd say is at least a microsecond or two long.

    bongk: Please be VERY careful. Those gas-discharge displays run at about 190 volts... we'd hate to lose you!

    And the MCU boards are extremely static sensitive.

    Side note: I used to repair these machines when I was in college. With just a multimeter, 10mHz logic probe, and soldering iron. I remember (and not fondly) lots of desoldering and resoldering of blown transistors and resistors on those displays.
  • AndreLAndreL Posts: 1,004
    edited 2011-02-07 22:47
    bongk, the updates to the displays are probably rather slow, so spin can do everything except catch the strobe, but there is a trivial solution, just get a 20 cent edge triggered d-latch, or flip flop of any kind with reset/clr, start the system off and clear the latch, then connect the strobe to the latch, and watch the latch with spin in a tight loop, once you see the strobe, read the data with spin, display the data, reset the latch. This way you stretch the strobe to infinity and can work with it on your terms and can avoid asm coding. Also, if you get a bunch of d-latches in the package you can use the same design pattern to latch all strobes, but of course, you need clr for each, so dual d-latch or JK is what you want.

    Andre'
  • kuronekokuroneko Posts: 3,623
    edited 2011-02-07 23:40
    @AndreL: Is there any specific reason not to use a counter?
  • AndreLAndreL Posts: 1,004
    edited 2011-02-08 02:17
    Well, the counter doesn't do what we want exactly, it will update, but then we have to read n-bits rather than a single bit. You could just test the 0'th bit and that would work, but if it strobe'd too fast for you to check it, you might miss an event when the 0th bit flipped, also that's a huge waste of a chip when he might have a number of lines that need pulse stretching. So, that's why a dual or quad flip flop with independent clocks, clears, etc. would be nice. So he can at least get 2 to 4 signals stretched with a single chip.

    But, counters, 555's, flip flops, latches will all do the job in one way or another.

    Andre'
  • kuronekokuroneko Posts: 3,623
    edited 2011-02-08 04:11
    My mistake, use whatever you think is right.
  • wmosscropwmosscrop Posts: 409
    edited 2011-02-08 09:02
    AndreL wrote: »
    This way you stretch the strobe to infinity and can work with it on your terms and can avoid asm coding.

    Andre', you are assuming that the data lines are still valid after the strobe pulse ends. That may or may not be true. Remember that the START of the strobe is when the data is guaranteed to be available. At some point, the MCU has to prepare the data lines for the next strobe, and I would expect the MCU to begin the preparation as soon as the strobe pulse has ended.

    Granted, I haven't proved this with a 'scope (mainly because I don't have access to a machine).

    Therefore, it MAY be possible to do this with SPIN, using a WAITPEQ or WAITPNE instruction and then immediately reading the state of the other lines... but you are talking about a valid data window that may be as small as 20 PASM instructions... SPIN may be that fast, but hub memory access timing (which may vary) could trip you up. Use PASM to be sure (especially because you don't have a 'scope).
  • bongkbongk Posts: 14
    edited 2011-02-08 09:56
    Thanks so much everyone! It still surprises me how helpful folks are on this forum.

    I think I've decided to take the safe route and use IC's to catch the data and the strobes.

    I see how I can monitor one of the strobe lines with a single JK flip-flop. There are five different stobe lines (one for each display in the backglass), is there an easier solution to monitor all five than five individual JK flip-flops? I've been looking through datasheets on octal latches, etc. but haven't found a chip that looks like it will work.

    Kevin
  • bongkbongk Posts: 14
    edited 2011-02-08 10:15
    Now that I've posted, it looks like I found something that will work.
    74F573 Octal Transparent Latch...Its Latch Enable input is "active falling edge, so I think I can tie all five strobes together with diodes to the Latch Enable pin, and each strobe to a data pin.
Sign In or Register to comment.