Posts

Showing posts from June, 2020

LCD interfacing with 8051-II

YouTube link here   LCD interfacing with 8051-II Please find the coding below: #include<regx51.h> #define lcd P3            // define LCD DATA pins to Port-2 sbit RS = P2^0;          // Register select sbit RW = P2^1;         // Read/write sbit EN = P2^2;          // Enable pin void delay (unsigned int ms)      // Delay function              {     unsigned int i, j;                                                            for (i=0; i<=ms; i++)     for (j=0; j<1275; j++);                                } void lcd_cmd(unsigned char x)    //LCD command function { ...

Interfacing 7 segment display with 8051

YouTube link here   Interfacing 7 segment display with 8051 Please find the code details below: #include<reg51.h> # define segment P2 void delay(unsigned int ms) { int i,j; for(i=0;i<ms;i++) for(j=0;j<1275;j++); } void main() { unsigned char i,array[] = {0x3F,0X06,0X5B,0X4F,0X66,0X6D,0X7D,0X07,0X7F,0X6F}; while(1) { for(i=0;i<10;i++)    {           segment = array[i];   delay(100);        }      } }   Thank You :)

Interface stepper motor to 8051 using Driver

YouTube link is here  Interface stepper motor to 8051 using Driver Please check code details below: #include <regx51.h> sbit En=P2^0;                   // Enable pin is set to P2.0 sbit Rs=P2^1;                   // Reset pin is set to P2.1 sbit H_F=P2^2;                // Half / Full pin is set to P2.2 sbit Cw_Ccw=P2^3;        // Clockwise / Counter CW pin is set to P2.3 sbit Clock=P2^4;              // Clock pin is set to P2.4 sbit Stop_Button=P1^0;   // To stop the Stepper motor  sbit F_Button = P1^2;       // Half wave Button sbit Ccw_Button = P1^4;  // Anti Clockwise Button void delay()                    // 500ms Delay function using Timers   { int count=0; while(count!=500)...