7 Segment LED digital display woes
Robofiend
Posts: 3
Hi, im a very new programmer, and I need some help trying to make the 7 segment LED digital display that I bout at radioshack (http://www.radioshack.com/product/index.jsp?productId=2062557&cp=&sr=1&origkw=7+segment+LED+digital+display&kw=7+segment+led+digital+display&parentPage=search)·work.· I have a propeller protoboard, and I really have very little idea where to start.· I don't really know how to work with the object I found (http://obex.parallax.com/objects/142/), and I dont know if its right.· If anyone could help, or if a post on this subject has already been made, please respond.· Thank you!
Comments
Do this.
Get the 7-segment, and just turn on one of the segments. All a 7 segment is a grouping of 7 LEDs. Make sure to use the correct resister else you will
burn the LED out...I think the forward voltage is what, 20ma?
Once you can turn on a LED using a batter+resister, you're nearly there!
Now just add the prop...you can connect the + to the res+led and toggle the pin to make the led work.
Now, you have 7 LED's to work with! Normally(?), you would multiplex all 7 segments, just turning on one at a time to make the effect of all of them "no"
ya?
make sense?
If you blow anything up, I never wrote this...
Take care,
~Kam (^8*
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
by googling i found this website explaining 7segment-displays
ee.hawaii.edu/~sasaki/EE361/Fall06/Lab/7disp.html
Each of the 7 LEDs take about 20 mA at 1,7V.
There are two things to take care of:
1.) you need a current-limiting resistor value: (3,3V - 1,7V) / 0,020A = 80 Ohms.
2.) If you want to connect it directly to the propeller 7 segments take 7x20mA = 140 mA
The propeller in summary can stand a current of 300 mA so with 2 7segements with at 280mA you are near to the limit
If you want to connect more than two 7segDisplay use transistors to switch on/off the LEDs of the 7segment-displays.
best regards
Stefan
Welcome to the forum! This is a great place to look for help and answers. Did the posts above help you? StefanL38 shows the calculation for determining the correct resistor size to use. 80 Ohms works, but in reality I would place a 120 Ohm or 240 Ohm resistor. I bet the LEDs will be bright enough with the lower current to each LED and this will keep you out of the danger zone on over current.
You said you have a protoboard, right? Have you read and tried any of the tutorials in the PE Kit (freely downloaded PDFs) to learn more about SPIN? Is this your first project with the Prop?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com·- Prop Blade, LED Painter, RGB LEDs, uOLED-IOC
www.sxmicro.com - a blog·exploring the SX micro
www.tdswieter.com
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Frankly, I dont know where to plug in the #s I want displayed and the pins- If there is an easy way which I am just missing, it would be great if you could tell me
Here is the provided demo code...
{Demo program for SevenSegment object.}
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
lowDigit = 3 'Low digit cathode
digits = 5 'Number of digits to display
Segment0 = 9 'Segment start pin
VAR
long counter
OBJ
sevenseg : "SevenSegment"
PUB Start
sevenseg.start(lowDigit, digits, Segment0, true)
counter := 0
repeat
sevenseg.SetValue(counter++)
if (counter / 10 // 10) == 0
sevenseg.disable 'disable the display when the second digit is 0
else
sevenseg.enable
waitcnt(clkfreq/10 + cnt)
sevenseg.SetValue(99)
Thanks for all your help!