Project Goals:

  1. Interactive and fun to use.
  2. Fit with the 4-bit computer era theme.
  3. Made from parts available in my laboratory.

I found the dialer and the edge connector/card, some OLD protoboard, and some 555s. After I pulled those items together, I designed a couple of parts to hold the bits together and printed them. The wiring is simple: a common wire to ground, and the ONHOOK and PULSE signals to a pair of inputs on the Badge. Conveniently, the badge input lines already have pull-ups installed. I used an oscilloscope to look at the pulses. They were surprisingly clean so I skipped hardware debounce and figured we'd be able to find a clock speed that would work reliably with the code to provide "natural debounce." All of the hardware was completed prior to Supercon.

The logic is simple. Wait for the ONHOOK signal to drop (High to Low transition), then count dialer pulses (Low to High transitions). I created a flow chart Saturday night at Supercon, with the intent to hand code it Sunday... but time was slipping away, and teamwork was in order! @Michael Welling happily obliged, and he took on the bulk of the translation from flowchart to assembly language. While I was noodling on the flow chart, he had gotten the assembler and serial upload working which made development much faster (duh!. You'll see numbers in the flow chart (100, 200, 300...) and those correspond to the areas of program memory where I was going to start coding each block by hand. 

To make debugging easy, we kept everything on the first page of Data Memory, including displaying the digit that was dialed. Register usage follows:

R0 = Used for comparisons - this is a special register by design of the 4-bit instruction set

R1 = Heart beat (on at the top of the flow chart, off briefly at the bottom before going back to the top)

R2 = Rotary Count Total (counts up in binary as the pulses are accumulated in a single dial stroke)

R3 = Rotary Count Input previous state (used to find edge transition)

R4 = Onhook Input previous state (used to find edge transition)

R5-9 = Display rows

RA = Out (not used)

RB = In (bit 0 is pulser, bit 1 is on hook)

The display routine sequences through each digit, starting with 1. The first digit is displayed, and then the Rotary Count Total is decremented until it is zero... which means it's time to stop drawing digits. The last digit drawn will be the correct digit corresponding to the total that was initially in the Rotary Count Total register. Yes, it's a hack, but it works!

After some experimenting with clock speed, we found 1000 Hz and 500 Hz worked reliably, and we are not seeing any extra or missed counts.

Thanks for the code skilz @Michael Welling! And thanks to my table mates for so willingly answering questions and allowing me to interrupt their own projects. Especially @koppanyh who is an incredible inspiration with HAND WRITTEN TERTRIS! 

3D Print files design in OnShape: 

https://cad.onshape.com/documents/f5048d0055d04fd5aaf1bce5/w/17af3cba529f3a0941d829f9/e/2b6add87e55f8117bdc92ff0?renderMode=0&uiState=636dd928f2de984f37970f3a