I would like to ask Is 7 segment decoder/driver necessary to connect 7 segment display with Atmel 90S8535 microcontoller.
- posted
18 years ago
I would like to ask Is 7 segment decoder/driver necessary to connect 7 segment display with Atmel 90S8535 microcontoller.
No. You can do the 7-seg decoding in software using a lookup table. And if you drive the LEDs at a low enough current (5mA for example), you can drive them direcly via a resistor.
Dave :)
Thanks Dave
Would you mind to explain some more if 4 digi 7 segment display are used in this case.
Cheers Sommes
These usually work by fast (, ~1/30 sec) 'time-multiplexing', so only is digit is lit at any time. In this case, there is something like an 'address' bus (turn on the wire / line corresponding to the digit you are lighting).
If each of the 7-segs in the display draws 1mA, then you should be able to attach directly to the microcontroller, (which should be at least 5mA drive/sink capable).
Of course, if the display contains no 'internal ' resistors, then you will have to provide these to get the correct current. (You can make them as bright as you like, provided you dont exceed the limit of the microcontroller).
For example, a 5V microcontroller output pin lighting up a red LED at 2mA will need a 1900 ohm resistor in series. This is based on ohms-law, where the voltage drop across the LED being 1.2 V { (5-1.2)/0.002}, which is typical of red LEDs. (use ~1.7V for Green.... or refer to LED / 7-seg specification for exact dropping voltage). Dave Merrett
in
no. if you use a common-anode 7 segment display (and apropriate resistors) you can drive the display directly. just like if it was it's 7 LEDs) it'll take 7 IO pins to do this (8 if you want the dot too) instead of 4 (or fewer if using I2C etc) for the 7-segment decoder/driver.
-- Bye. Jasen
IIRC the chip you were proposing to use has 35 I/O pins according to my cheat sheet
So you could drive the 8 LEDs in 4 7 segment displays and have three I/0 pins left over.
if the chip is anything like the 2313 the pins can sink upto 20mA which could give a very bright 7 segment display.
If you're wanting to use fewer IO pins consider matrixing the displays.
this'd mean using 4 I/O pins to drive transistors to select a one of the 4
7-segment units and using 8 other I/O pins to drive the individual segmentsand then writing a program to light the individual displays one at a time, very fast (eg 100 times per second) this way the light output will be 1/4 of what you'd ge driving the display full-time, but only 8 + 4 = 12 I/O pins would be needed leaving 23 for other purposes...
Bye. Jasen
Thanks Jasen
Hmmm, I think you'd better consult the datasheet again, there is a maximum current that you can run through the chip substrate, usually in the vicinity of 100 to 200ma absolute maximum.
If you buffer the segment drive as well as the commons then all you need to do is to increase the peak current 4 times to boost the average current back to "normal".
Another possibility is to simply use high brightness displays and run at much lower current.
*Peter*ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.