7 Segment Display Multiplexing
MR
Posts: 46
I have 10, 7 segment displays (Common Anode) wired in Parallel i.e. all the "A's" wired together, "B's" wired together etc., connected to a 7447 BCD Decoder.
Where do I connect the Anodes of each display?
What Command(s) do I use change the refresh rate of the display? "How to change the frequency from say 30hz to 100 hz"
I would be much obliged if someone would write some sample code with comments to learn from.
Basic Stamp 2P-40 Pins:
0=7447 A pin
1=7447 B pin
2=7447 C pin
3=7447 D pin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
They say if you Play a Microsoft CD backwards you can hear satanic messages, that's nothing because if you play it forward it installs Windows!
I didn't Fail 10,000 times, I simply found 10,000 ways that didn't work. -Thomas Edison
Where do I connect the Anodes of each display?
What Command(s) do I use change the refresh rate of the display? "How to change the frequency from say 30hz to 100 hz"
I would be much obliged if someone would write some sample code with comments to learn from.
Basic Stamp 2P-40 Pins:
0=7447 A pin
1=7447 B pin
2=7447 C pin
3=7447 D pin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
They say if you Play a Microsoft CD backwards you can hear satanic messages, that's nothing because if you play it forward it installs Windows!
I didn't Fail 10,000 times, I simply found 10,000 ways that didn't work. -Thomas Edison
Comments
www.parallax.com/StoreSearchResults/tabid/768/txtSearch/stampworks/List/0/SortField/4/ProductID/144/Default.aspx
You'll need to limit the total anode current for each display to under 20mA if you want to drive each of the displays from a Stamp I/O pin or you'll need to use a PNP switching transistor between each anode lead (collector) and Vdd (emitter) with the base lead connected to one of 10 Stamp I/O pins through a 1K resistor. You'll need current limiting resistors between each of the common segment leads and the 7447 outputs.
If you want to save I/O pins, you could use a 74HC42 BCD decoder to drive the PNP transistors and you'd only need 4 I/O pins to control the 10 displays.
Example Code:
Do
High 0 'Turn on Digit 1
digOne=%0001 'Digit 1 is 1
pause 10
low 0 ' Turn off Digit 1
clrDig=%1111 ' Clear the digit
high 1 'Turn on Digit 2
digTwo=%0100 'Digit two is 4.
clrDig=%1111 'Blank the display
loop
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
They say if you Play a Microsoft CD backwards you can hear satanic messages, that's nothing because if you play it forward it installs Windows!
I didn't Fail 10,000 times, I simply found 10,000 ways that didn't work. -Thomas Edison
If you need to adjust the refresh rate, the PAUSE time can be an expression or variable. You can adjust that.