BCD to 7 Segment Display Decoder

BCD to 7 Segment Display Decoder Featured Image

In this post I’ll show how you can drive 7 Segment LED display with PIC16F876A. Instead of using a dedicated IC’s like 4511 we’ll program the micro controller to convert  BCD input code 0 – 9 to a 7 Segment LED display code. PIC16F876A can sink enough current to drive a standard common anode display without external current boosting transistors thus simplifying the design. Decoder has 4 BCD inputs in addition to Latch (LE),LED Test inverted (LT) and Blanking inverted (BL) pins. LED test  and Blanking  inputs allow to test, turn the segments OFF and if necessary to multiplex several 7 segments.Also you can Latch the inputs by applying “1” to LE pin. BCD code is identical to a binary representation up to 9 therefore requiring 4 bits for each digit. Decoder will ignore higher value inputs. In order to show additional characters you’ll need to modify the code, essentially building a binary to 7-Segment converter. Schematic and source code are available on the next page. Here you can see all implemented digits.
BCD to 7 Segment Display LED Characters




Posted in PIC16F876A Projects