Seven segment multiplexing using 8051 microcontroller (AT89C51)
Many electronic devices use four seven segment displays to display their output. The four seven segment displays can be connected in two ways. One way is to connect the four displays to the four ports of the microcontroller. However this is not a good way, as this will block all the ports and we cannot use microcontroller for any other purpose.
To overcome this problem, we use multiplexing of seven segment display. In multiplexing we use the concept of persistence of vision i.e., human brain cannot differentiate between two events occurring at a time difference of less than .04 sec. In this case the four digits are displayed one after the other so fast that the human brain cannot detect the difference. Although only one digit is displayed at a time it appears as a four digit number.
The four seven segments are connected as shown in the circuit diagram. The ‘a’ to ‘g’ pins of all the segments are interconnected to each other and connected to the data port P2 of the microcontroller. All the ‘a’ pins are connected to the pin P2.0, ‘b’ to P2.1 and so on. The four control pins from the controller AT89C51 are connected to the four pins of the port P1 as per the diagram.
The control pins are used to enable the seven segments. Whenever a high is given to any of the control pin, the corresponding seven segment gets activated. As a result the data corresponding to the first digit is sent on the port P2, which gets displayed. To display the next digit, the next seven segment is activated and the corresponding data is loaded on port P2. Similarly the third and four digits are displayed and the process keeps repeating.
This Code is only visible to Registered users. Please Login/Register
BC547 is an NPN bi-polar junction transistor. A transistor, stands for transfer of resistance, is commonly used to amplify current. A small current at its base controls a larger current...
Seven Segment Display
A seven segment display is the most basic electronic display device that can display digits from 0-9. They find wide application in devices that display numeric information like digital clocks, radio, microwave ovens...