Proving the Concept

After essentially rushing to try to get something hooked up on our first go around, we took a little extra time to figure out what was going on. In the process Kevin worked up a much better debugging solution and Scott proved an age old truth...always check the cables.

Cables are a nasty little lot. They wiggle loose, they simply stop working for no good reason. And, unless you took the time to insure they can't be, you can hook them up all wrong. Here is the photo evidence, exhibits #1, #2 and #3

thumb_cable_labeled.JPG thumb_cable_in_place.JPG thumb_68b09e_pinouts1.jpg

The first exhibit shows the prototype board end of the cable, carefully labeled. Note that it says, on the very right end, D7 RED.

Exhibit 2 shows the cable end hooked up to the 68B09E socket. It sockets into pins 24 through 31.

Exhibit 3 is the pinout chart for the 68B09E. We see from this that pins 24 through 31 are indeed the Data bus pins. Pin 24 in particular is D7.

Check out Exhibit 2 again. It clearly shows the Green wire going to pin 24. The D0 Green wire. That's right. Backwards. There you have it. There was zero chance that pushing the buttons for D7 D6 and D5 would have any chance to register on the correct pins on our proto board. Easy enough to fix though. Presented to you to prove the point that, even though I double and triple checked those cables, I still got it wrong. Dastardly cables.

Debugging. Anyone who has written any code or put together, well anything, has probably needed to debug it. Given that our first test was not successful and things will only get more complicated from here, we decided to look for something we can trust more than hooking up a bunch of blinking LEDs to debug the system.

The Propeller chip is a powerful little tool. Each of the 8 independent cores has a complete video processor built in. Using just 3 output pins, we were able to hook up an old school composite monitor to use for debug output. Using the sample code provided as a head start, Kevin was able to work up a nice on screen matrix for showing the status of things. We have far more confidence in this setup than we did in our little LED light. In fact we event tested it with a button on the protoboard.

Back to the machine. With cables, laptop, protoboard and composite monitor in tow, we made our way back to the pinball. This time with the data cable hooked up in the correct orientation, and the monitor perched nicely on top of the backbox. This picture is unfortunately blurry, but it shows the debug screen. It is showing a matrix for all of the switches, top row for the dedicated switches, and the 8x8 matrix below. We'll try to get better snapshots up at some point.


That's Kevin in the photo btw. I'll show up at some other time I'm sure, but I tend to be the one taking photos.

Plugged back in and turned on. Once again no smoke. And, pressing the three buttons on the coin door, the controller accurately displayed the status of the switches on the new debug output. Fantastic!

At the end of the day all we did was hook up a switch, but this is our proof of concept. We are able to patch into the CPU board at a few key locations and read at least one of the pinball subsystems. We have gained a better grasp on the propeller chip itself, and we have a decent debugging setup. Now we need to work on controlling some more complicated systems, starting with the switch matrix. Before we can do that, we really need to replace that ribbon cable with something both more reliable and longer. Just the fun I was looking for, wiring up more cables.