【正文】
LL SHOW_DIG2 INC LCD_X MOV A,71H 。個位 LCALL SHOW_DIG2 INC LCD_X MOV A,39。.39。 MOV B,LCD_X LCALL LCDP2 MOV A,70H 。加載小數(shù)點位 INC LCD_X 。設(shè)置顯示位置 LCALL SHOW_DIG2 。顯示數(shù)據(jù) RET 。*************************** 第二行顯示數(shù)字子程序 ************************* SHOW_DIG2:ADD A,30H MOV B,LCD_X LCALL LCDP2 RET 。*************************** 第二行顯示數(shù)字子程序 ************************* LCDP2: PUSH ACC MOV A,B 。設(shè)置顯示地址 ADD A,0C0H 。設(shè)置 LCD 的第二行地址 LCALL WCOM 。寫入命令 POP ACC 。由堆棧取出 A LCALL WDATA 。寫入數(shù)據(jù) RET 。*************************** 對 LCD 做初始化設(shè)置及測試 ************************* SET_LCD: CLR LCD_EN LCALL INIT_LCD 。初始化 LCD LCALL STORE_DATA 。將自定義字符存入 LCD 的 CGRAM RET 。****************************** LCD 初始化 *********************************** INIT_LCD: MOV A,38H 。2 行顯示,字形 5*7 點陣 LCALL WCOM LCALL DELAY1 MOV A,38H LCALL WCOM LCALL DELAY1 MOV A,38H LCALL WCOM LCALL DELAY1 MOV A,0CH 。開顯示,顯示光標(biāo),光標(biāo)不閃爍 LCALL WCOM LCALL DELAY1 MOV A,01H 。清除 LCD 顯示屏 LCALL WCOM LCALL DELAY1 RET 。***************************** 清除 LCD 的第一行字符 ************************** CLR_LINE1:MOV A,80H 。設(shè)置 LCD 的第一行地址 LCALL WCOM MOV R0,24 。設(shè)置計數(shù)值 21 C1: MOV A,39。 39。 。載入空格符至 LCD LCALL WDATA 。輸出字符至 LCD DJNZ R0,C1 。計數(shù)結(jié)束 RET 。************************* LCD 的第一行或第二行顯示字符 ********************** LCD_PRINT:CJNE A,1,LINE2 。判斷是否為第一行 LINE1: MOV A,80H 。設(shè)置 LCD 的第一行地址 LCALL WCOM 。寫入命令 LCALL CLR_LINE 。清除該行字符數(shù)據(jù) MOV A,80H 。設(shè)置 LCD 的第一行地址 LCALL WCOM 。寫入命令 JMP FILL LINE2: MOV A,0C0H 。設(shè)置 LCD 的第二行地址 LCALL WCOM 。寫入命令 LCALL CLR_LINE 。清除該行字符數(shù)據(jù) MOV A,0C0H 。設(shè)置 LCD 的第二行地址 LCALL WCOM FILL: CLR A 。填入字符 MOVC A,@A+DPTR 。由消息區(qū)取出字符 CJNE A,0,LC1 。判斷是否為結(jié)束碼 RET LC1: LCALL WDATA 。寫入數(shù)據(jù) INC DPTR 。指針加 1 JMP FILL 。繼續(xù)填入字符 RET 。*************************** 清除 1 行 LCD 的字符 **************************** CLR_LINE: MOV R0,24 CL1: MOV A,39。 39。 LCALL WDATA DJNZ R0,CL1 RET DE: MOV R7,250 DJNZ R7,$ RET 。**************************** LCD 間接控制方式命令寫入 ************************* WCOM: MOV P0,A 。寫入命令 CLR LCD_RS 。RS=L,RW=L,D0D7=指令碼, E=高脈 沖 CLR LCD_RW SETB LCD_EN LCALL DELAY1 CLR LCD_EN RET 。**************************** LCD 間接控制方式數(shù)據(jù)寫入 ************************* WDATA: MOV P0,A 。寫入數(shù)據(jù) SETB LCD_RS CLR LCD_RW SETB LCD_EN LCALL DE CLR LCD_EN LCALL DE RET 。************************** 在 LCD 的第一行顯示字符 ************************** LCDP1: PUSH ACC MOV A,B 。設(shè)置顯示地址 ADD A,80H 。設(shè)置 LCD 的第一行地址 LCALL WCOM 。寫入命令 POP ACC 。由堆棧取出 A LCALL WDATA 。寫入數(shù)據(jù) RET 22 。****************************** 聲光報警子程序 ******************************* BEEP_BL: MOV R6,100 BL2: LCALL DEX1 CPL BEEP CPL RELAY DJNZ R6,BL2 MOV R5,10 LCALL DELAY RET DEX1: MOV R7,180 DE2: NOP DJNZ R7,DE2 RET 。****************************** 延時子程序 ******************************* DELAY: MOV R6,50 DL1: MOV R7,100 DJNZ R7,$ DJNZ R6,DL1 DJNZ R5,DELAY RET DELAY1: MOV R6,25 。延時 5 毫秒 DL2: MOV R7,100 DJNZ R7,$ DJNZ R6,DL2 RET END ag an employment tribunal clai Emloyment 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 informu, take advice from one of the anisations listed under Fur ther help. Employment tribunals are less formal than some other courts, but it is still a legal process and you will need to give evidence under an oath or affirmation. Most people find making a claim to an employment tribunal challenging. If you are thinking about making a claim to an employment tribunal, you should get help straight away from one of the anisations listed under Further help. ation about dismissal and unfair dismissal, see Dismissal. You can make a claim to an employment tribunal, even if you haven39。t appealed against the disciplinary action your employer has taken against you. However, if you win your case, the tribunal may reduce any pensation awarded to you as a result of your failure to appeal. Remember that in most cases you must make an application to an employment tribunal within three months of the date when the event you are plaining about happened. If your application is received after this time limit, the tribunal will not usually accept i. If you are worr