Interfacing 7 segment display using 8051 microcontroller

By | June 29, 2015

 

8051 7-segment display interfacing – block diagram

8051 7-segment display interfacing - block diagram

8051 7-segment display interfacing – code

/* 
 * Project : Interfacing 7 segment display using 8051 microcontroller
 * Description : Aim is to display 0-9 numbers on a 7-segment display.
 * 				  data lines of 7-seg are connected to PORT-2  of 8051
 *               
 * Software : Keil uVison4
 * MCU : AT89S51/S52/C51/c52
 * Oscillator : 11.0592 Mhz
 * Date : 29-06-2015
 */   

#include<reg51.h>

unsigned char luk[]=
					{
						0xc0,0xf9,0xa4,0xb0,0x99,
						0x92,0x82,0xf8,0x80,0x90
					};
void delay(int i)
{
	unsigned int j;
	for(;i;i--)
	for(j=122;j;j--);
}

void main()
{
	char i=0;
	while(1)
	{
		for(i=0;i<10;i++)
		{
			P2 = luk[i];
			delay(1000);
		}
	}
}

8051 7-segment display interfacing – circuit

8051 7-segment display interfacing – circuit

8051 push button interfacing – output image

interfacing 7 segment display using 8051 microcontroller_2

8051 7-segment display interfacing – output video

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *