Intro: Drive the HSD4039GA-1 With Arduino
This is an example of the HSD4039GA-1 4-digit 7-segment common anode display being driven by an Arduino Uno clone. This display features 13 pins all in one line. I desoldered this one from a Sharp brand microwave.
Step 1: Run the Code
Compile and upload the attached code to your board. I recommend doing this before hooking up the display. It's just good practice.
I can't take all the credit so check out the tutorial that got me here. Special thanks to Rudy Schlaf for the MAKE course at the University of South Florida (www.makecourse.com).
Step 2: Connect the Display
For simplicity, I plug the display straight into the board. The inline pins make this possible. Pins 13 and 12 of the display are the cathodes for the individual dots of the colon. I don't know why they are individually addressable so please comment if you do. I bent pin 13 of the display to connect with pin 12 so that they both go into pin 13 of the Arduino(see image).
Because this is a green LED display, it can handle the voltage(~5v) straight from my board. Be warned that your board may be different and put out a higher voltage thus harming your display. It is always good practice to use pull-down resistors on the cathodes of the display. DO NOT plug a red display straight into the board! It will burn out!
Step 3: Power Up
With the display hooked up to the powered board all digits should light up and count up from 00:00 to 59:59. I configured the code to mimic a clock in the format of minutes and seconds so it will count up for about 60min and then start over. Please note that there is no strict time keeping involved. I have played around with values to get close to minutes and seconds but it is not accurate.