【正文】
cd_set_e();asm(”nop”);asm(”nop“);lcd_clear_e();delay_nus(40);}void LCD_Busy(void){unsigned char temp,high;unsigned char low;LCD_DIR_PORT=0x0f;do{teap=LCD_OP_PORT;temp=tempamp。BIT3;LCD_OP_PORT=temp;Lcd_set_rw(); //Set LCD to READlcd_clear_rs();lcd_set_e();delay_nus(3);high=LCD_IP_PORT;lcd_clear_e();lcd_set_e();asm(”nop”);asm(”nop”);low=LCD—IP—PORT;.lcd_clear_e();}while(high&0x80);delay_nus(20);}void LCD_WriteControl(unsigned char CMD){char temp;LCD_Busy();LCD_DIR_PORT=0xff;temp=LCD_OP_PORT;temp=tempamp。BIT3:LCD_OP_PORT=(CMD &0xf0)| temp;lcd_clear_rw();lcd_clear_rs();lcd_set_e();asm(”nop”);asm(”nop”);lcd_clear_e();LCD_OP_PORT=(CMD4)|temp;lcd_clear_rw();lcd_clear_rs();lcd_set_e();asm(”nop”)。asm(”nop”)。lcd_clear_e();}void LCD_WriteData(unsiqned char Data){char temp~LCD_Busy();LCD_DIR_PORT=0xFF。temp=LCD_OP_PORT。temp=tempamp。BIT3;LCD_OP_PORT=(Data&0xf0)| temp。 lcd_clear_rw(); //Set LCD to write lcd_set_rs();lcd_set_e();asm(”nop”);asm(”nop”)。lcd_clear_e();LCD_OP_PORT=(Data4)|temp。lcd_clear_rw();lcd_set_rs();lcd_set_e();asm(”nop”);asm(”nop”);lcd_clear_e();}//*********************************////***初始化液晶***////*********************************//void Init_LCD(void){LCD_INIT()。LCD_WriteControl(LCD_FUNCTION_SET);LCD_WriteControl(LCD_OFF);LCD_WriteControl(LCD_CLEAR);LCD_WriteControl(LCD_MODE_SET);LCD_WriteControl(LCD_ON);LCD_WrlteControl(LCD_HOME);//LCD_WriteControl(0x90);}//************************************************/// /***清屏 ***////************************************************//void LCD_Clear(void){LCD_WriteControl(0x01);}//***********************************************////***移動(dòng)光標(biāo)到0行0列***////***********************************************//void LCD_Home(void){LCD_WriteControl(0x02); }//**********************************************////***顯示字符,在當(dāng)前光標(biāo)處***////***********************************************//void LCD_DisplayCharacter(char Char){LCD_WriteData(Char);}//***********************************************////***在Flash中、在指定的行和列顯示一個(gè)字符串***////***********************************************//void LCD_DisplayString_F(char rOW,char column,unsigned char__flash*string){LCD_Cursor(row,column);while(*string)}LCD_DisplayCharacter(*string++);}}//***********************************************////***在RAM中、在指定的行和列顯示一個(gè)字符串***////***********************************************//void LCD_DisplayString(char row,char column,unsigned char*string){LCD_Cursor(row,column);while(*string)LCD_DisplayCharacter(*string++);}//***********************************************////***定位行和列的光標(biāo)***////***********************************************//void LCD_Cursor(char row,char column){switch (row) {case 1:LCD_WriteControl(0x80+column一1);break;case 2:LCD_WriteControl(0xc0+column一1);break。case 3:LCD_WriteControl(0x94+column—1);break。case 4:LCD_WriteControl(0xd4+column—1);break。default:break;}}//**************************////***打開光標(biāo)***////**************************//void LCD_Cursor_On(void){LCD_WriteControl(LCD_CURS_ON);}//***************************////***關(guān)閉光標(biāo)***////***************************//void LCD_Cursor_Off(void){LCD_WriteControl(LCD_ON);//********************////***關(guān)閉LCD***////*************殺******//void LCD_Display_Off(void){LCD_WriteControl(LCD_OFF);} //*******************////***打開LCD***////******************//void LCD_Display_On(void){LCD_WriteControl(LCD_ON);}MAIN.Cinclude”includes.h”define WDR() asm(”wdr”)unsigned char alarm _1_set,alarm_2_set,alarm_3_set;__flash unsigned char test[ ]=”DSl302 time is:”;void main(void){ unsigned char hour,min,sec; unsigned char date,month。unsigned char flag;flag=1;PORTB=0x00;DDRB=0x00;DDRD=0x7f;PORTD=0xFF。Init_LCD();LCD_DisplayString(0,1,”Initialize OK!”);delay_nms(500)。 LCD_WriteControl(LCD_CLEAR);WDR();writebyte(w_protect,0x00); //設(shè)置時(shí)間//writebyte(sec_w,0x09);//writebyte(min_w,0x09);//writebyte(hour_w,0x09)。while(1){ sec =readbyte(sec_r); //讀秒 min =readbyte(min_r); //讀分 hour =readbyte(hour_r); //讀小時(shí) month =readbyte(month_r); date =readbyte(date_r); WDR();LCD_DisplayString_F(1,1,test);if(flag){ LCD_Cursor(2,1); LCD_DisplayCharacter(~+hour/10); LCD_DisplayCharacter(~+hour%lO); LCD_DisplayCharacter(’:,); WDR(); LCD_DisplayCharacter(~+m~/10)} LCD_DisplayCharacter(~+min%10); LCD_DisplayCharacter(39。:’); WDR(); LCD_DisplayCharacter(d~+s~/10); LCD_DisplayCharacter(~+sec%10): LCD_Cursor(2,ii); WDR(); LCD_DisplayCharacter(~Y+month/10); LCD DisplayCharacter(dY+month%10); LCD_DisplayCharacter/0; WDR(); LCD_DisplayCharacter(~+date/10); LCD_DisplayCharacter(~+date%10): WDR(); } }}usart.cdefine USART_Cinclude”includes.h”void usart_putchar(char c){ if(c==飛rr) usart_putchar@f); while(UCSRAamp。(15)); UDR=c:)void init—usart(void){ //USART initialization //Communication Parameters:8 Data,1 Stop。No Parity //USART Receiver:Off //USART Transmitter:On //USART Mode:Asynchronous //USART Baud rate:19200 UCSRA=Ox00; UCSRB=Ox08; UCSRC=0x86; UBRRH=0x00; UBRRL=0x0C;g an employment tribunal claimEmployment tribunals sort out disagreements between employers and employees.You may need to make a claim to an employment tribunal if: you don39。t agree with the disciplinary action your employer has taken against you your employer dismisses you and you think that you have been dismissed unfairly.For more information about dismissal and unfair dismissal, seeDismissal.You can make a claim to an employment tribunal, even if you haven39。ta