I don't (yet) have the space/patience needed to make my own PCBs, and I think I'm a bit more space-constrained than Quinn is, so I decided to make a smaller version. Not so small that I venture into the wild and wooly world of SMD, mind you, but small enough.
Here's the completed project:
The basic setup is the same as Quinn's -- '165 input latches feeding an ATTiny, which in turn controls '595s which feed four 7-segment displays. A few changes, though, in no particular order:
- I opted to use an ATTiny85V instead of the ATTiny13 Quinn used. Primarily this was because I happened to have '85Vs on hand. At the same time, though, the '13 has 1K Flash and 64 bytes of SRAM, whereas the '85V has 8K Flash and 512 bytes of SRAM, so the extra headroom was nice. I haven't a clue whether my program would fit on a '13. It probably would've, but I just didn't want to have to even think about whether I was about to run the chip out of SRAM.
- My first time using resistor networks -- I have them acting as pull-downs for the inputs, just before the '165 latch. I don't know whether that makes a difference in practice, but I've been burned by floating inputs before, and didn't want to repeat the experience.
- I really didn't want to have to remove the ATTiny to reprogram it, so I added a 6-pin ISP header. Adding in-system programming was an adventure in itself, which began on the breadboard. I learned that I can't just slap a Bread Head (another Blondihacks invention) onto the microprocessor and expect it to start working. In my case, the signals sent from the ISP to the ATTiny were causing the circuit to change the state the ATTiny pin I was using for serial input. The circuit signals on that pin fought the ISP signals on that pin, and thus programmer no worky. I solved (hacked?) that by adding a jumper for that input pin. If you want to program the ATTiny, you remove the jumper. If you want normal operation, you install the jumper.
- To reduce part count, I'm only using one resistor on each 7-segment display. They're CA displays, wired so that the '595s talk directly to the cathodes, without any resistors. The anodes are tied together, with each display connected to Vcc via a single 150 ohm resistor. The downside of doing this is that the display is marginally brighter or dimmer depending on the number of segments illuminated, but I'm willing to put up with that to save 24 resistors.
- The 7-segment displays (Vishay TDSO 1150L's) have a staggered pin pattern. In one direction they're on 0.1" centers, but in the other they're on 0.05" centers. Turns out you can bend the middle pins out such that all pins end up on 0.1" centers around the perimeter of the device. I did that to make a breakout board with a standard Radio Shack proto board, and for some reason chose to make the Eagle part that way as well. Bending the pins out again for assembly of the real board was pointless, and the new pad layout complicated routing. I should've just used the standard pad layout for the board.
- When I created the custom Eagle part for the 7-segment displays, I didn't check the drill hole diameters for the pins. It's a really tight fit, which is even more annoying when your pins are hand-bent and could really do with some margin for error (see above). Memo to self: check drill hole diameters.
- The mounting holes may be too close to the components. This may or may not turn out to be a problem.
The boards arrived in very short order, thanks to Laen's excellent Dorkbot PCB service. The boards are excellent quality, as always. With the exception of the 7-segment displays (my fault), everything went together smoothly, and now I have my very own working HexOut.