how to get loop out from while loop if( min=del) lines to main .....display()....
void display()
{
label:
ds1307_get_date(day,month,year,dow);
ds1307_get_time(hrs,min,sec);
lcd_gotoxy(1,1);
printf(lcd_putc,"Time: %02d:%02d:%02d",hrs,min,sec);
lcd_gotoxy(1,2);
printf(lcd_putc,"Date:%02d:%02d:20%02d",day,month,year);
RHR=read_eeprom(0);
RMN=read_eeprom(1);
if((min==RMN)&&(Hrs==Rhr))
{
while(1)
{
//delay_ms(100);
output_high(PIN_C5);
lcd_gotoxy(1,1);
printf(lcd_putc,"\f system");
lcd_gotoxy(1,2);
printf(lcd_putc,"\ processing.....");
output_high(PIN_C6);
delay_ms(2000);
output_high(PIN_C7);
delay_ms(2000);
output_high(PIN_C2);
delay_ms(1000);
write_eeprom(4, 1);
del=read_eeprom(2);
RHR=read_eeprom(0);
RMN=read_eeprom(1);
// val=RHR+del;
//if(val==24)
//val=0;
//if(val==25)
//val=1;
//if(val==26)
//val=2;
//if(val==27)
//val=3;
//val1=RMN;
ds1307_get_time(hrs,min,sec);
if(min==del)
{
delay_ms(100);
output_low(PIN_C5);
output_low(PIN_C6);
output_low(PIN_C2);
output_low(PIN_C7);
delay_ms(100);
Write_eeprom(4, 0);
printf(lcd_putc,"\f");
break;
}
}
}
if(min==del)
{
while(1)
{
set_adc_channel(0);
complt=read_adc();
delay_ms(100);
if(Complt>30)
{
lcd_gotoxy(1,1);
printf(lcd_putc,"\f Process");
lcd_gotoxy(1,2);
printf(lcd_putc," complete ");
output_low(PIN_C1);
goto label;
}
if(complt<15)
{
lcd_gotoxy(1,1);
printf(lcd_putc,"\f Process ");
lcd_gotoxy(1,2);
printf(lcd_putc," incomplete ");
output_high(PIN_C1);
delay_ms(100);
if(!input(PIN_A2))
{
delay_ms(100);
output_low(PIN_C1);
Write_eeprom(4, 0);
break;
}
}
}
}