Micro Controller Homework Assignment Help

case 4:

Programming Assignment Help Order Now

LCD_write(CTRL_WR,LCD_HOME_L1);

DisplayString(LCD_LINE1,"SET YEAR");

LCD_write(CTRL_WR,LCD_HOME_L2);

DisplayString(LCD_LINE2,year_string);

if(Time_inState==0)

state=0;

switch(getcommand())

{

case 'A':

state=5;

year=((year_string[2]-48)*1000)+((year_string[3]-48)*100)+((year_string[4]-48)*10)+((year_string[5]-48));

Time_inState=5;

break;

case 'B':

value=year_string[n]-48;

if(++value>9) value=0;

year_string[n]=value+48;

Time_inState=5;

break;

case 'C':

if(++n>5) n=2;

Time_inState=5;

break;

}

break;

case 5:

LCD_write(CTRL_WR,LCD_HOME_L1);

DisplayString(LCD_LINE1,"SET M0NT");

LCD_write(CTRL_WR,LCD_HOME_L2);

DisplayString(LCD_LINE2,month_string);

if(Time_inState==0)

state=0;

switch(getcommand())

{

case 'A':

state=6;

Time_inState=5;

break;

case 'B':

state=0;

LCD_write(CTRL_WR,LCD_HOME_L2);

DisplayString(LCD_LINE2," ");

Time_inState=5;

break;

case 'C':

if(++month>12) month=1;

for(n=0;n<3;n++)

{

month_string[n+2]=month_in_year[month-1][n];

}

Time_inState=5;

break;

}

break;

case 6:

Assignment help | Micro Controller Homework Assignment Help | Online Tutoring | Sample Homework