毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 课程设计 >> 正文

单片机教学打铃控制器程序设计 第3页

更新时间:2010-7-7:  来源:毕业论文

  JMP_SET_S:
  AJMP SET_S
  H_UP: CJNE R5,#23,INC_H
  MOV R5,#0FFH
  INC_H: INC R5
  AJMP GATE_H
  H_DOWN: CJNE R5,#0,DEC_H
  MOV R5,#24
  DEC_H: DEC R5
  AJMP GATE_H
  ;===========分钟设置===============
  SET_M: JNB FLASH_S,GATE_M
  MOV DIS_MEM2,#0AAH
  SJMP CLS_M
  GATE_M: MOV A,R6 毕业论文http://www.youerw.com
  ACALL HBCD
  MOV DIS_MEM2,A
  MOV A,R5
  ACALL HBCD
  MOV DIS_MEM1,A
  MOV A,R7
  ACALL HBCD
  MOV DIS_MEM3,A
  CLS_M: ACALL DIS_TIME
  ACALL DISPLAY
  MOV A,NEW_TIME
  CJNE A,#0FFH,JMP_2
  MOV NEW_TIME,#0
  DJNZ TIME_OVER,JMP_2
  AJMP WAITE
  JMP_2: ACALL KEY_CHECK
  MOV A,KEY_ST
  CJNE A,#0FFH,SET_M
  MOV KEY_ST,#0
  MOV TIME_OVER,#30
  JNB UP,M_UP
  JNB DOWN,M_DOWN
  JNB LEFT,JMP_SET_H
  JNB RIGHT,SET_S
  JNB ESC,TIME_SET_ESC
  JNB ENTER,TIME_SET_OK
  SJMP SET_M
  M_UP: CJNE R6,#59,INC_M
  MOV R6,#0FFH
  INC_M: INC R6
  AJMP GATE_M
  M_DOWN: CJNE R6,#0,DEC_M
  MOV R6,#60
  DEC_M: DEC R6
  AJMP GATE_M
  JMP_SET_H:
  AJMP SET_H
  ;============秒设置=================
  SET_S: JNB FLASH_S,GATE_S
  MOV DIS_MEM3,#0AAH
  SJMP CLS_S
  GATE_S: MOV A,R7
  ACALL HBCD
  MOV DIS_MEM3,A
  MOV A,R5
  ACALL HBCD
  MOV DIS_MEM1,A
  MOV A,R6
  ACALL HBCD
  MOV DIS_MEM2,A
  CLS_S: ACALL DIS_TIME
  ACALL DISPLAY
  MOV A,NEW_TIME
  CJNE A,#0FFH,JMP_3
  MOV NEW_TIME,#0
  DJNZ TIME_OVER,JMP_3
  AJMP WAITE
  JMP_3: ACALL KEY_CHECK
  MOV A,KEY_ST
  CJNE A,#0FFH,SET_S
  MOV KEY_ST,#0
  MOV TIME_OVER,#30
  JNB UP,S_UP
  JNB DOWN,S_DOWN
  JNB LEFT,JMP_SET_S_M
  JNB RIGHT,JMP_S_H
  JNB ESC,TIME_SET_ESC
  JNB ENTER,TIME_SET_OK
  SJMP SET_S
  JMP_S_H:AJMP SET_H
  S_UP: CJNE R7,#59,INC_S
  MOV R7,#0FFH
  INC_S: INC R7
  AJMP GATE_S
  S_DOWN: CJNE R7,#0,DEC_S
  MOV R7,#60
  DEC_S: DEC R7
  AJMP GATE_S
  JMP_SET_S_M:
  AJMP SET_M
  ;======================================
  TIME_SET_ESC:
  AJMP NEW_DIS ;时间设置取消/返回
  TIME_SET_OK:
  MOV S_MEM,R7 ;时间设置确认/返回
  MOV M_MEM,R6
  MOV H_MEM,R5
  AJMP NEW_DIS
  ;=========打铃设置程序段===============
  ALARM_SET:
  MOV TIME_OVER,#20
  MOV AL_NUMBER,AL_TOTA
  AL_LIST:MOV A,AL_NUMBER
  JNZ NUMBER_N
  MOV DIS_MEM1,#0
  MOV DIS_MEM2,#0AAH
  MOV DIS_MEM3,#0AAH
  ACALL DIS_TIME
  AJMP WAITE_A
  NUMBER_N:
  DEC A
  RL A
  ADD A,#80H
  MOV R0,A
  MOV A,AL_NUMBER
  ACALL HBCD
  MOV DIS_MEM1,A
  MOV A,@R0
  ACALL HBCD
  MOV DIS_MEM2,A
  INC R0
  MOV A,@R0 毕业论文http://www.youerw.com
  ACALL HBCD
  MOV DIS_MEM3,A
  ACALL DIS_TIME
  WAITE_A:ACALL DISPLAY
  MOV A,NEW_TIME
  CJNE A,#0FFH,JMP_4
  MOV NEW_TIME,#0
  DJNZ TIME_OVER,JMP_4
  AJMP WAITE
  JMP_4: ACALL KEY_CHECK
  MOV A,KEY_ST
  CJNE A,#0FFH,WAITE_A
  MOV KEY_ST,#0
  MOV TIME_OVER,#20
  JNB UP,NUM_UP
  JNB DOWN,NUM_DOWN
  JNB ESC,JMP_ESC_AL
  JNB ENTER,JMP_OK_AL
  JNB SET_ALARM,JMP_DEL_AL
  JNB SET_TIME,CHANGE_AL
  SJMP WAITE_A
  JMP_DEL_AL:
  AJMP DEL_AL
  ;-------------------------------------
  NUM_UP: MOV A,AL_NUMBER
  CJNE A,AL_TOTA,INC_NUM
  MOV AL_NUMBER,#0FFH
  INC_NUM:INC AL_NUMBER
  AJMP AL_LIST
  ;-------------------------------------
  NUM_DOWN:MOV A,AL_NUMBER
  CJNE A,#0,DEC_NUM
  MOV AL_NUMBER,AL_TOTA
  SJMP J_DECNUM
  DEC_NUM:DEC AL_NUMBER
  J_DECNUM:AJMP AL_LIST
  ;==========修改打铃时间点=================
  CHANGE_AL:
  MOV A,AL_NUMBER
  JZ JMP_ADD_AL
  DEC A
  RL A
  ADD A,#80H
  MOV R0,A
  MOV A,@R0
  MOV R6,A
  INC R0
  MOV A,@R0
  MOV R7,A
  ;------------时修改------------------
  SET_AL_H:
  JNB FLASH_S,GATE_AL_H
  MOV DIS_MEM2,#0AAH
  SJMP CLS_AL_H
  GATE_AL_H:
  MOV A,AL_NUMBER
  ACALL HBCD
  MOV DIS_MEM1,A
  MOV A,R6
  ACALL HBCD
  MOV DIS_MEM2,A

上一页  [1] [2] [3] [4] 下一页

单片机教学打铃控制器程序设计 第3页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。