Skip to main content

Posts

Showing posts with the label 7-segment

7-Segment LED display interfaced with LPC2148 microcontroller

7 Segment Display is an array of 8 LEDs connected or arranged in a special pattern together to form or display the digits from 0-9 and Dot functions also. LPC2148 micro-controller is an ARM architecture based 32-bit controller used many embedded applications. Program: Theory: 7-segment display contains 10 pins- 8 for LEDs, 1 for common cathode and other one for common anode. 8 LEDs structure forms a display in format of "8" which is used to display counting from 0 to 9 one at a time. You can operate it in two modes- common cathode and common anode. Four 7-segment displays are connection of four displays in a row (as shown in a figure). The features of four 7-segment is same as single 7-segment but, the only difference is that you can display number from 0000 to 9999. These are types are very much applied in general display applications as they are easy to implement and costs less than other display. There is slight different in coding part of four 7-segment disp...

Program to create Up counter on three 7-Segment LED display

7-Segment LED display is the combination of 8 LEDs in a special digital display format. I have explained the 7-segement LED displays in earlier post and simple digit display on it. Now, i want to discuss the interfacing of different 7-segment displays with 8051 microcontroller. Interfacing: - As you can see above circuit diagram in which three 7-segments are connected to port P1, P2, P3 and the common cathode are connected to the port P0.1, P0.2 and P0.3. Now, we have to run a counter from 0-999. So, the basic concept is that you implement binary to hexadecimal conversion code in which MSB and LSB are extracted. Now, take MSB as hundredth digit and LSB as ones place digit. Code: #include"REGx52.h" #define seg_data P1 #define seg_data1 P2 #define seg_data2 P3 sbit seg1=P0^1; sbit seg2=P0^2; sbit seg3=P0^3; int num=0; int ones=0,tens=0,hundreds=0; void display_digit(int ); void delay(); void display_digit1(int ); void display_digit2(int ); void main() {...

Implementation of four 7-Segment LED display multiplexing with 8051 microcontroller

7-segment LED display are the widely used displays in many applications that can display any character or digital value. We have already discussed the 7-segment concept in our previous post which defines it as the combination of 8 LEDs forming "8" display and divided as the common cathode and common anode. Now, learn the concept of multiplexing by which you can connect many 7-segment displays to a single port of 8051 microcontroller. Earlier we discussed about the 7-segment up counter display in which 3 7-segments are connected to 3 different ports and up counter is running from 0-999. But, it had limitation. You can not connect many 7-segments to a single port. Multiplexing of 7-segment: - In the above diagram you can see how i have connected the 4 7-segment display to the port P2 of 8051 microcontroller. It is a schematic diagram which i have drawn in Proteus ISIS professional. But, in practical you can implement the same concept. Use 8 pins of any ...

Keypad matrix implemented with 7-Segment display with 8051

You have used many Keypads in many day-to-day applications. Keypad consists of 0-9 numbers and '#' and '*' icons too. I have also discussed about the interfacing of keypads with 8051 microcontroller and discussed the rows and columns algorithm which one has to learn before implementation of Keypad matrix. 7-segment LED display consists of 8-LEDs in '8' digit pattern. Project description: - Here, we have implemented Keypad matrix with Port P1 of 8051 microcontroller. In this diagram, Keypad is of 4x3 matrix i.e. 4 rows and 3 columns formatting. But, you can built your own Keypad matrix using SPST switches and IxJ matrix can be used according to your need but more ports have to used as 8 pin are maximum in each port of 8051. Next, 7-segment LED display is interfaced to Port P2, according to the diagram. This interfaced was also discussed in previous posts too. I have used common cathode 7-segment and each case with hex code, has to be defined fo...