//Connection of Load #define LOAD_DDR DDRC #define LOAD_PORT PORTC #define LOAD_POS PC0 //Global variable for the clock system volatile unsigned int clock_millisecond=0; volatile char clock_second=0; volatile char clock_minute=0; volatile char clock_hour=0; void Wait(uint8_t n) { uint8_t i,temp; temp=n*28; for(i=0;iStart "); uint8_t selection=0; uint8_t old_pinb=PINB; while(1) { while((PINB & 0b00001111) == (old_pinb & 0b00001111)); //Input received if(!(PINB & (1<"); if(selection == 1) LCDWriteStringXY(11,1,"^"); if(selection == 2) LCDWriteStringXY(14,1,"^"); _delay_loop_2(0); _delay_loop_2(0); _delay_loop_2(0); _delay_loop_2(0); _delay_loop_2(0); _delay_loop_2(0); _delay_loop_2(0); _delay_loop_2(0); } //Start the Load LoadOn(); //Now start the timer clock_hour = hr; clock_minute = min; clock_second =0; LCDClear(); LCDWriteStringXY(4,0,"Cleaning"); while(1) { LCDWriteIntXY(4,1,clock_hour,2); LCDWriteString(":"); LCDWriteIntXY(7,1,clock_minute,2); LCDWriteString(":"); LCDWriteIntXY(10,1,clock_second,2); //LoadOn(); if(!(PINB & (1<