• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I need to send RTC data to Seven segment display

Not open for further replies.


Dear all
I need to send RTC data to Seven segment display


I am using 74LS248 IC for BCD to drive seven segment
I am using 4094 IC for mux

I need use single port for both BCD driver and MUX driver ( see image for wiring diagram)

MSB for BCD driver
LSB for MUX driver

can I have algorithm for above program
My MCU is 16f877a + Assembly language


Well-Known Member
Hi Micro:
I just posted a sample which might suit you. It uses a shift register for driving the 7 segment and then direct drives each digit column with a dedicated pin via a PNP or PFET to handle the common anode curent loading. It handles 4 digits as posted , but upping to 6 digits is simple enough. Just alter the column select routine a bit to add 2 more pins to drive the extra columns. That counts up to 7 pins for the solution as opposed to 8 in yours.
For CA 6 digit it might make sense to go with a sourcing driver (UDN2981) than a pair of small dual P-fets for a 4 digit CA display as I used. If you are going Com Cathode a ULN2003 sinking driver is cheap. You'll need to invert the logic drive in the code though for both the 7 seg. digits and the com anode.


Jon Wilder

Active Member
First off, you need to have resistors between the pins on the 74LS248 and each of the LED segments.

Second off...it's pretty common to use a timer interrupt for driving the 7 segment display mux. I would use a buffer register in RAM for each segment to store each digit's segment data in, then these registers would get read in the timer interrupt for displaying each digit. The main code would fetch the display values from a look up table upon processing the RTC data and store them in the registers.
Not open for further replies.

Latest threads

EE World Online Articles