Try New Document
Very simple program, here 1, 2, 3 shows in display using at89c51 microcontroller and seven segment display.
Port 2 pin connect to seven segment display as per given below figure.
#include
void delay(unsigned int t)
{
while(t--);
}
void main()
{
P2=0x00;
while(1)
{
P2=0x3f;
delay(100000);
P2=0x06;
delay(100000);
P2=0x5b;
delay(100000);
}
Port 2 pin connect to seven segment display as per given below figure.
#include
void delay(unsigned int t)
{
while(t--);
}
void main()
{
P2=0x00;
while(1)
{
P2=0x3f;
delay(100000);
P2=0x06;
delay(100000);
P2=0x5b;
delay(100000);
}

Comments
Post a Comment