NewBie Need Help in 7 Segment LED Display

Status
Not open for further replies.

westkid85

New Member
Hi everyone currently i m doing a hide and seek alarm clock project
currently i m using the pic18f2331, but now i m replacing the lcd display with 7-seg 4dig to display the time (88:88) in order to prevent the lcd screen to break down when falling.
i would like to know how do i connect the 7segment 4dig led display to the pic?
do i need extra components such as multiplexer or timer or counter?
 
The PIC has enough current to drive each of the segments of the display directly from the PIC (presuming the voltage necessary is less than 5V, in which case you'll want to include some resistors as appropriate, or run your PIC at a lower voltage if possible).

The only problem with the PIC you're using and doing this, is that you don't have enough I/O pins on the 18F2331 to have one each for all four seven-segment digits. The easiest way around this I can think of is to get either a 74LS47 (for common-anode displays) or 74LS48 (for common-cathode displays) binary-coded-decimal to seven-segment driver for each seven-segment digit. That way, you'll only have to use four I/O pins from the PIC for each digit (16 pins in total). The decimals (if you're using them for the ":" part of the display) can obviously be set by direct connection to your power source if they're not being toggled in any way.
 
Thanks for the tip, Mike. I'd wondered how that worked exactly. westkid85: go with his suggestion.

If you really needed the extra 3 I/O pins (and to save 3 resistors, too), you could go with Gramo's idea, but using binary output and one of the BCD-to-7-segment ICs I mentioned above.
 
Hank Fletcher said:
...you don't have enough I/O pins on the 18F2331 to have one each for all four seven-segment digits.
Sure you do. You just need to use a little electronic trickery. What you do is assign 4 pins to each be connected to the common (anode or cathode) pin of one of the 7-segment displays. Then you assign 7 pins to each be connected to one segment on all 4 displays. Your logic will then drive the first of the four selection pins either high or low (depending on whether you're using common cathode or common anode displays), with the remaining 3 pins on the opposite state while the 7 data pins will turn on the appropriate segments to display the first digit; the remaining displays will be blank at this time. In turn, you activate each display in this manner to show the second, third and fourth digit, very rapidly in sequence. This happens so fast that your eye perceives all the digits to be displayed simultaneously. Almost all LED display devices work this way.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…