Skip to main content

Posts

Showing posts with the label 8051 interfacing

Implement Moving text display on 16x2 LCD

LCD- Liquid Crystal Display-  consists of two parallel plates between which the space is filled with liquid crystals. When you apply external voltage, the back plate transfer charge towards the front plate which opaque and display the text on screen. 16X2 LCD display 5x7 matrix on its screen using RW, RS, EN and D0-D7 pins of LCD and the black display is controlled by microcontroller. Here is the moving text display code on 16x2 LCD and we have already discussed string display program:- #include "REG52.h" #define LCD P0 sbit RS=P2^1; sbit RW=P2^2; sbit EN=P2^3; int i, j; void CMD(char); void DATA1(char); void display(char d[]); void display(char t[]); //**************************************** void delay(int k) // Delay Function { for(i=0;i<=100;i++) { for(j=0;j<=k;j++); } } //**************************************** void display(char d[]) // Dispaly for 1st row { for(l=0; d[l]!='';l++) { DATA(d[l]); delay(200); } } void display2(char t[]) // D...

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...