- This topic has 1 reply, 2 voices, and was last updated 11 years, 11 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
|
Miscellaneous › Others › code for 7-segment display as a stot watch by Divya Bharat
will u plz mail me the code of using 7-segmant display as a stot watch for counting seconds , minutes as well as hours….. using phillips P89V51RD2 … I REQUIRE IT INSTANTLY … PLZ MAIL ME as soon as possible at my gmail id i.e [email protected] or at yahoo id i.e [email protected]
Program to interface single seven segment
#include<reg51.h>
delay_ms(int time) // Time delay function
{
int i,j;
for(i=0;i<time;i++)
for(j=0;j<1275;j++);
}
void main()
{
char num[]={0x40,0xF9,0x24,0x30,0x19,0x12,0x02,0xF8,0x00,0x10}; // Hex values corresponding to digits 0 to 9
int c;
while(1)
{
for(c=0;c<10;c++)
{
P2=num[c];
delay_ms(200);
}
}
}