Travis Rich -- HTMAA

week 1 Proposal
week 2 Press Fit
week 3 FabISP
week 4 3D
week 5 PCB
week 6 Casting
week 7 ATtiny
week 8 Big
week 9 Input
week 10 Epoxy
week 11 Output
week 12 Interface
week 13 Network
week 14 Machine
week 15 Final

Week 11 -- Output Device

11/20/12

Introduction

This week we're tasked with driving some output form a microcontroller board. I had an old 7 segment LED board lying around from last semester and I decided I wanted to finally make it work. Oh - it's huge. It's over half a foot tall. I think it will also be used as part of the display in my final project - so we get to kill two birds with one stone here.

Hardware

I decided to make the board with a fabduino. That was straight forward to fabricate. The tricky part which I didn't realize until after I made the fabduino (and before I decided on the 7seg LED) was that I was going to need a shift register to drive all of the pins necessary. Given this hindsight, and the little amount of time I had (ahh crit day stress!), I had to, for the time being, resort to using a breadboard to jump between my fabduino and 7-segment LED display. I used a 8-bit serial-in parallel-out shift register (74HC595). This was fairly straight forward to use, and if you're in the Arduino environment, there's a nice tutorial to step you through the process.

Programming

Once everything was setup, I referred to the 7-segment display's datasheet to reference the pin mapping. My initial goal was to cycle from 0-9 to demonstrate the functionality. Unfortunately, after mapping out all of the numbers, I found that the display was driving completely wrong segments. After a good amount of debugging, I realized that the datasheet's pinout diagram was incorrect. I reverse engineered each pin and segment individually and then remapped my numbers from that. The mapping that wound up working is as follows (these are the binary values sent to the register):

From that point, everything was relatively straight forward, and the code has a simple delay counter that can be changed to vary how long each number is displayed for.