__interrupt staticvoidr_tau0_channel0_interrupt(void) { /* Start user code. Do not edit comment generated here */ num = num+1; if(num>100) num=100; WDTE = 0xAC; /* End user code. Do not edit comment generated here */ }
voidmain(void) { hdwinit(); R_PCLBUZ0_Create(); R_TAU0_Create(); R_TAU0_Channel0_Start(); R_MAIN_UserInit(); lcd_init(); num_keyboard=0; /* Start user code. Do not edit comment generated here */ while (1U) { lcd_display(0," 任泽华 " " 自动化71班 " " 2171411498 "); lcd_display(48,date); Keyboard_scan(); if(num_keyboard==14){sflag=1;} if(sflag==1)num_10 = num/10; else {num=0;num_10=0;} if(bflag==0 && num_10==10){ R_PCLBUZ0_Start(); bflag=1; delaya();R_PCLBUZ0_Stop();} if(num_keyboard==13){bflag=0; num=0;num_keyboard=0;sflag=0;}
if(num_keyboard!=0) display(); if(num_keyboard==13){bflag=0; num=0;num_keyboard=0;sflag=0;} leddispaly(); NOP(); WDTE = 0xAC; } /* End user code. Do not edit comment generated here */ }