

Form a 0 to 9 counter with a predetermined delay (around 1/2 second here).The software part of the project has to do the following tasks. C1, C2 and X1 are related to the clock circuit. S3 is the reset switch and R2,C3 forms a debouncing circuitry. R3 to R10 are current limiting resistors. The common cathode seven segment display D1 is connected to the Port 1 of the microcontroller (AT89S51) as shown in the circuit diagram. How to setup simple 0 to 9 up counter using 8051 and more importantly how to interface a seven segment LED display to 8051 in order to display a particular result. This simple circuit illustrates two things. The circuit diagram shown above is of an AT89S51 microcontroller based 0 to 9 counter which has a 7 segment LED display interfaced to it in order to display the count. Interfacing seven segment display to 8051. The common digit drive patterns (0 to 9) of a seven segment display are shown in the table below. 7 segment LED displayĭigit drive pattern of a seven segment LED display is simply the different logic combinations of its terminals ‘a’ to ‘h‘ in order to display different digits and characters. The pin out scheme and picture of a typical 7 segment LED display is shown in the image below. In common anode type, the anode of all LEDs are tied together as a single terminal and cathodes are left alone as individual pins. In common cathode type, the cathode of all LEDs are tied together to a single terminal which is usually labeled as ‘ com‘ and the anode of all LEDs are left alone as individual pins labeled as a, b, c, d, e, f, g & h (or dot). Seven segment displays are of two types, common cathode and common anode. Different characters can be displayed by selectively glowing the required LED segments. A seven segment display consists of seven LEDs arranged in the form of a squarish ‘8’ slightly inclined to the right and a single LED as the dot character.

Knowledge about how to interface a seven segment display to a micro controller is very essential in designing embedded systems. 7 segment LED display is very popular and it can display digits from 0 to 9 and quite a few characters like A, b, C.

This article is about how to interface a seven segment LED display to an 8051 microcontroller.
