En1=1; /*****start rtc chip***** If(rcount<10) //rotate in clockwise direction /Write_eeprom(0,0) { Display(500); In1=1; Write_eeprom(1,0); In2=0; Display(500); } Write_eeprom(1,0); Else // rotate in anticlockwise direction Display(500); { In1=0; Msgdisplay(“ TIME:”); In2=1; While(1) } { rcount=rcount+1; Xx:lcdcmd(0×c1); if(rcount==20) For(i=3;i>0;i- -) rcount=0; { b2temp=z; Z=read_eeprom(i-1); delay(200); B1=z&0×0f; en1=0; B2=(z&0×f0)>>4; in1=in2=0; Lcddata(B2+0×30); } Lcddata(B1+0×30); } If(I !=1) For(x=0;x<1000;x++) //check for switch Lcddata( : ‘ ‘); { If(i==2) if(sw==0) //if switch is pressed then { rotate the base If(b2temp!=z) { {
/*****start rtc chip***** /Write_eeprom(0,0) Display(500); Write_eeprom(1,0); Display(500); Write_eeprom(1,0); Display(500); Msgdisplay(“ TIME:”); While(1) { Xx:lcdcmd(0×c1); For(i=3;i>0;i- -) { Z=read_eeprom(i-1); B1=z&0×0f; B2=(z&0×f0)>>4; Lcddata(B2+0×30); Lcddata(B1+0×30); If(I !=1) Lcddata( ‘ : ‘); If(i==2) { If(b2temp!=z) { En1=1; If(rcount<10) //rotate in clockwise direction { In1=1; In2=0; } Else // rotate in anticlockwise direction { In1=0; In2=1; } rcount=rcount+1; if(rcount==20) rcount=0; b2temp=z; delay(200); en1=0; in1=in2=0; } } For(x=0;x<1000;x++) //check for switch { if(sw==0) //if switch is pressed then rotate the base {