这是2001年本人自考完以后的第一个作品:他开国内先河,填补中国人本土没有能力和技术生产研发投影机的空白,同时也打破了长期以来日系投影机高价垄断中国市场的局面,也为中国本土征得了几分光。
当初本来是我自己的项目,听信了当时公司老板的谗言,拿出来作为公司的项目,结果上当受骗。之所以贴出来,是对自己的一种警示,也是对想创业或有项目的同行们一个提醒-------不要随便听信他人的谗言,啥子东西都要白纸黑字写清楚........
第一次画系统级全套图纸,没有经验,有点乱,
先贴上程序,原理图,pcb等后面可以下载,DIY玩家无需本人授权,全部资料可以直接使用,商业应用需要本人书面授权方可。
;;液晶投影机固件程序
;单片机型号:AT89C2051
;程序版本:1.0
;程序设计:姬瑞江(赖伟林)
;2002年7月
;;I/O口定义
LAMP_SW BIT P3.0
ON_OFF BIT P3.1
LIGHT_SW BIT P3.2
FAN_MOTOR BIT P3.3
LCD_SW BIT P3.4
LIGHT_CHK BIT P3.5
RST222S BIT P3.7
TEMPR_CHK BIT P1.0
ALARM BIT P1.2
ALARM_OFF BIT P1.3
MODE_COL BIT P1.4
FAN1_CHK BIT P1.5
FAN2_CHK BIT P1.6
MODE_CTRL BIT P1.7
;标志寄存器定义
FLAG1 EQU 20H
TEMPR_FLG BIT FLAG1.2
LIGHT_FLG BIT FLAG1.3
TIME_END BIT FLAG1.4
FLAG2 EQU 21H
FAN1_FLG BIT FLAG2.0
FAN2_FLG BIT FLAG2.1
MODE_FLG BIT FLAG2.2
MODE_N_P BIT FLAG2.3
flag3 equ 22h ;
SLOW_FLG BIT FLAG3.1
MEDM_FLG BIT FLAG3.2
QUIK_FLG BIT FLAG3.3
;数据寄存器定义
FAN1_SPEED EQU 5FH
FAN2_SPEED EQU 5EH
MODE_FREQ EQU 5DH
stat_flg equ 5ch ;***
fan1_err_t equ 5bh
fan2_err_t equ 5ah
fan12_err_t equ 59h
tempr_err_t equ 58h
light_err_t equ 57h
loop_t equ 56h
loop1_t equ 55h
loop2_t equ 54h
ORG 0000H
AJMP START
ORG 000BH
lJMP TIMER0_INT ;转定时器0中断程序
ORG 001BH
lJMP TIMER1_INT ;转定时器1中断程序
ORG 080H
START: MOV SP,#60H
CALL INIT_PRG ;初始化
CLR TR0
CLR TR1
START1: mov flag2,#0 ;清标志寄存器2
NOP
NOP
JB TEMPR_CHK,wait0 ;温度正常, 转
CALL QUIK_FLASH ;温度不正常, 快闪
call dj3 ; 发警示音
START2: CLR FAN_MOTOR ; 开风机
CALL DELAY3_5S
start20: CALL FAN1CHECK ; 测速
CALL FAN2CHECK
mov a,flag2
jz start1
cjne a,#02,start30
call dj2
ajmp start1
start30: jnc start40
call dj1
ajmp start1
start40: call djj2
ajmp start1
;自检通过
WAIT0: setb fan_motor
call di2
wait: CALL SLOW_FLASH
CALL REST222S
wait1: JB ON_OFF,$
CALL DELAY_20mS
JB ON_OFF,wait1
;一次启动
call di1
SETB RST222S
mov flag3,#0
call lamp_off
mov stat_flg,#01
mov loop_t,#3
CLR FAN_MOTOR ;开风机
PLAY: CLR FAN_MOTOR
mov flag2,#0
CALL DELAY3_5S
CALL FAN1CHECK ;风机1检测
CALL FAN2CHECK ;风机2检测
mov a,flag2
jz play06
CALL QUIK_FLASH
CALL REST222S
JnB FAN1_FLG,PLAY02
jb fan2_flg,play03
call dj1
dec loop_t
mov a,loop_t
jnz PLAY04
ajmp play05
PLAY02: call dj2
dec loop_t
mov a,loop_t
jnz PLAY04
ajmp PLAY05
PLAY03: call djj2
dec loop_t
mov a,loop_t
jnz PLAY04
ajmp play05
PLAY04: JB ON_OFF,PLAY
CALL DELAY_20mS
JB ON_OFF,play
play01: call di1
play05: setb fan_motor ;关风机
setb fan_motor
clr ea
SETB RST222S
mov flag3,#0
mov stat_flg,#0
mov p1,#0ffh
mov p3,#0ffh
ajmp start ;返回初始态
;风机正常,启动高压灯
PLAY06: CLR LIGHT_SW ;开高压灯
play0: CLR LIGHT_SW
mov flag2,#0
mov fan1_err_t,#0
mov fan2_err_t,#0
mov fan12_err_t,#0
mov loop_t,#15
light00: CALL FAN1CHECK ;风机1检测
CALL FAN2CHECK ;风机2检测
mov a,flag2
jnz light001 ;风机不正常,转
dec loop_t
mov a,loop_t
jnz light00
ajmp light005
light001: JnB FAN1_FLG,light002
jb fan2_flg,light003
inc fan1_err_t
call dj1
mov a,fan1_err_t
cjne a,#03,light00
AJMP light004
light002: inc fan2_err_t
call dj2
mov a,fan2_err_t
cjne a,#03,light00
ajmp light004 ;3次不正常,退出
light003: inc fan12_err_t
call djj2
mov a,fan12_err_t
cjne a,#03,light00
light004: setb light_sw ;关高压灯
setb light_sw
setb fan_motor ;关风机
setb fan_motor
mov p1,#0ffh
mov p3,#0ffh
ajmp start
light005: JNB LIGHT_CHK,LIGHTERROR;高压灯未成功启动
ajmp main
;光检错,处理
LIGHTERROR:call quik_flash
call rest222s
setb light_sw
MOV R4,#3
LIGHT2: setb light_sw
MOV R5,#30
LIGHT1: mov flag2,#0 ;清风机状态标志
mov fan1_err_t,#0
mov fan2_err_t,#0
mov fan12_err_t,#0
light100: CALL FAN1CHECK ;风机1检测
CALL FAN2CHECK ;风机2检测
mov a,flag2
jnz light101 ;风机不正常,转
ajmp light01
light101: JnB FAN1_FLG,light102
jb fan2_flg,light103
inc fan1_err_t
call dj1
mov a,fan1_err_t
cjne a,#03,light100
AJMP light004 ;3次不正常,退出
light102: inc fan2_err_t
call dj2
mov a,fan2_err_t
cjne a,#03,light100
ajmp light004 ;3次不正常,退出
light103: inc fan12_err_t
call djj2
mov a,fan12_err_t
cjne a,#03,light100
ajmp light004 ;3次不正常,退出
LIGHT01: mov flag2,#0
mov fan1_err_t,#0
mov fan2_err_t,#0
mov fan12_err_t,#0
JB ON_OFF,light3 ;(ON1_1)未按键,转
CALL DELAY_20mS
JB ON_OFF,light3
ajmp play01 ;*** 按键,转退出
light3: DJNZ R5,LIGHT100 ;未按键
djnz r4,light4
clr ea
light5: call dj4 ; 光源启动失败
call delay_1s
JB ON_OFF,light5 ;(ON1_1)未按键,转
CALL DELAY_20mS
JB ON_OFF,light5
light010: call di1
ajmp light004
light4: CLR LIGHT_SW ;启动高压灯
CLR LIGHT_SW
mov flag2,#0 ;清风机状态标志
mov fan1_err_t,#0
mov fan2_err_t,#0
mov fan12_err_t,#0
mov loop_t,#15
light400: CALL FAN1CHECK ;风机1检测
CALL FAN2CHECK ;风机2检测
mov a,flag2
jnz light401 ;风机不正常,转
dec loop_t
mov a,loop_t
jnz light400
ajmp light6
light401: JnB FAN1_FLG,light402
jb fan2_flg,light403
inc fan1_err_t
call dj1
mov a,fan1_err_t
cjne a,#03,light400
AJMP light004
light402: inc fan2_err_t
call dj2
mov a,fan2_err_t
cjne a,#03,light400
ajmp light004
light403: inc fan12_err_t
call djj2
mov a,fan12_err_t
cjne a,#03,light400
ajmp light004 ;3次不正常,退出
light21: ajmp light2
light6: JNB LIGHT_CHK,LIGHT21
;高压灯启动成功
main: call di3
MAIN0: CALL REST222S
CALL LAMP_OFF
clr lcd_sw
clr lcd_sw
main1: mov flag2,#0 ;清风机状态标志
mov fan1_err_t,#0
mov fan2_err_t,#0
mov fan12_err_t,#0
main2: CALL FAN1CHECK ;风机1检测
CALL FAN2CHECK ;风机2检测
mov a,flag2
jnz main3 ;风机不正常,转
ajmp main6
main3: JnB FAN1_FLG,main4
jb fan2_flg,main5
inc fan1_err_t
call dj1
mov a,fan1_err_t
cjne a,#04,main6
AJMP light004
main4: inc fan2_err_t
call dj2
mov a,fan2_err_t
cjne a,#04,main6
ajmp light004
main5: inc fan12_err_t
call djj2
mov a,fan12_err_t
cjne a,#04,main6
ajmp light004 ;4次不正常,退出
main6: JB ON_OFF,main2 ;(ON2)未按键,等待
CALL DELAY_20ms
JB ON_OFF,main2
;二次启动
mov stat_flg,#2
call di1
CALL LAMP_ON ;开LED
AJMP MAIN_LOOP
;正常播放,主循环
MAIN_LOOP:mov loop_t,#60 ;延时30S
main_loopa:setb alarm
CALL MODE_PRG ;制式处理
JB MODE_FLG,MAIN_LOOP0
JB MODE_N_P,MAIN_LOOP00
CLR MODE_CTRL
AJMP MAIN_LOOP0
MAIN_LOOP00:
SETB MODE_CTRL
MAIN_LOOP0:JnB ON_OFF,MAIN_LOOP1
CALL DELAY_20ms
JB ON_OFF,OFF1 ;转关机1
MAIN_LOOP1:dec loop_t
mov a,loop_t
jnz main_loopa
;故障检测
MOV FLAG2,#0 ;清标志寄存器2
CALL FAN1CHECK ;测风机1
CALL FAN2CHECK ;测风机2
MOV A,FLAG2
JZ MAIN_LOOP10 ;风机12正常,转
CJNE A,#02,MAIN_LOOP1A ;
AJMP FAN2_ERR
MAIN_LOOP1A:JNC FAN12_ERR
AJMP fan1_err
main_loop10:mov fan1_err_t,#0
mov fan2_err_t,#0
mov fan12_err_t,#0
main_loop11:JnB ON_OFF,MAIN_LOOP20;(OFF1)未按键,继续
CALL DELAY_20ms
JB ON_OFF,OFF1 ;转关机1
main_loop20:MOV FLAG2,#0
JNB TEMPR_CHK,TEMPR_ERR;温度不正常,转
mov tempr_err_t,#0
main_loop30:JNB LIGHT_CHK,LIGHT_ERR;光检不正常,转
mov light_err_t,#0
main_loop40:JNB ON_OFF,MAIN_LOOP
CALL DELAY_20ms
JNB ON_OFF,MAIN_LOOP
ajmp off1
FAN1_ERR: AJMP FAN1ERROR
FAN2_ERR: AJMP FAN2ERROR
FAN12_ERR:AJMP FAN12ERROR
LIGHT_ERR:AJMP LIGHT_ERROR
TEMPR_ERR:AJMP TEMPRERROR
;关机1
OFF1: CALL DI1
CALL SLOW_FLASH
CPL MODE_CTRL ;制式取反
call delay_1s
call delay_1s
jb ON_OFF,main_loop4
call delay_20ms
jb ON_OFF,main_loop4
SETB RST222S
call di1
ajmp OFF2 ; 转关机2
;误关机处理
main_loop4:
call delay0_5s
call di2
CALL REST222S
;延时5分钟,等待重新“开机”
MOV R0,#200
MAIN_DLY4:JNB ON_OFF,PUSH_5M
CALL FAN1CHECK ;查风机1
JB FAN1_FLG,FAN1_ERR
JNB ON_OFF,PUSH_5M
CALL FAN2CHECK ;查风机2
JB FAN2_FLG,FAN2_ERR
call delay0_5s
DJNZ R0,MAIN_DLY4
;5分钟内未按ON_OFF,执行“关机2”
UN_PUSH5M:SETB RST222S
call di2
call delay0_5s
;关机2
OFF2: CLR TR0
CLR TR1
SETB LCD_SW
CALL STOP
AJMP start
;5分钟内按ON_OFF,执行“开机”
PUSH_5M: call di1
call lamp_on
clr lcd_sw
CPL MODE_CTRL
ajmp main_loop
;风机1故障处理
FAN1ERROR:CLR FAN2_ERR_T
CLR FAN12_ERR_T
inc fan1_err_t
CLR RST222S
FAN1ERR: call quik_flash
CALL Dj1
CALL Dj1
CALL Dj1
mov a,fan1_err_t
cjne a,#3,fan1err1
ajmp off2
fan1err1: ;call lamp_on
ajmp main_loop11
;风机2故障处理
FAN2ERROR:CLR FAN1_ERR_T
CLR FAN12_ERR_T
inc fan2_err_t
CLR RST222S
FAN2ERR: call quik_flash
CALL Dj2
CALL Dj2
CALL Dj2
mov a,fan2_err_t
cjne a,#3,fan2err1
ajmp off2
fan2err1: call lamp_on
ajmp main_loop11
;风机12故障处理
FAN12ERROR:CLR FAN1_ERR_T
CLR FAN2_ERR_T
inc fan12_err_t
CLR RST222S
FAN12ERR: call quik_flash
CALL Djj2
CALL Djj2
CALL Djj2
MOV A,FAN12_ERR_T
CJNE A,#3,FAN12ERR1
AJMP OFF2
FAN12ERR1:CALL LAMP_ON
AJMP MAIN_LOOP11
;温度故障处理
TEMPRERROR:inc tempr_err_t
CLR RST222S
TEMPRERR: call quik_flash
CALL Dj3
CALL Dj3
CALL Dj3
mov a,tempr_err_t
cjne a,#3,TEMPRERR1
ajmp off2
TEMPRERR1:call lamp_on
ajmp main_loop30
;光检故障处理
light_ERROR:inc light_err_t
CLR RST222S
lightERR: call quik_flash
CALL Dj4
CALL Dj4
CALL Dj4
mov a,light_err_t
cjne a,#3,lightERR1
ajmp off2
lightERR1:call lamp_on
ajmp main_loop40
;初始化
INIT_PRG: SETB EA
SETB ET0
SETB ET1
MOV TMOD,#00010010B
MOV TH0,#06H
MOV TL0,#06H
MOV TH1,#3CH
MOV TL1,#0AFH
SETB LAMP_SW
SETB LIGHT_SW
SETB LCD_SW
SETB FAN_MOTOR
MOV FAN1_SPEED,#0
MOV FAN2_SPEED,#0
MOV MODE_FREQ,#0
mov stat_flg,#0
mov fan1_err_t,#0
mov fan2_err_t,#0
mov fan12_err_t,#0
mov tempr_err_t,#0
mov light_err_t,#0
MOV FLAG1,#0
MOV FLAG2,#0
MOV R7,#0
MOV R6,#0
RET
;二次关机
STOP: SETB RST222S
SETB LCD_SW
SETB LCD_SW
SETB LIGHT_SW
SETB LIGHT_SW
CALL REST222S
CALL MEDM_FLASH
CALL DELAY_20M
SETB FAN_MOTOR
SETB FAN_MOTOR
CALL DELAY_1S
RET
DELAY200US:PUSH 00H
MOV R0,#50
DELAY200US_1:
DJNZ R0,DELAY600US_1
POP 00H
RET
DELAY600US:PUSH 00H
MOV R0,#150
DELAY600US_1:
DJNZ R0,DELAY600US_1
POP 00H
RET
DELAY_1MS: PUSH 00H
delay_1ms1:MOV R0,#250
djnz r0,$
POP 00H
RET
delay_20ms:push 00h
push 01h
mov r1,#20h
delay_20ms1:
mov r0,#250h
djnz r0,$
djnz r1,delay_20ms1
pop 01h
pop 00h
ret
DELAY0_3S: PUSH 00H
PUSH 01H
PUSH 02H
MOV R0,#7
DELAY0_3S2:MOV R1,#95
DELAY0_3S1:MOV R2,#125
DJNZ R2,$
DJNZ R1,DELAY0_3S1
DJNZ R0,DELAY0_3S2
POP 02H
POP 01H
POP 00H
RET
DELAY0_6S: PUSH 00H
PUSH 01H
PUSH 02H
MOV R0,#14
ajmp DELAY0_3S2
DELAY0_5S: PUSH 00H
PUSH 01H
PUSH 02H
MOV R0,#10
DELAY0_5S2:MOV R1,#100
DELAY0_5S1:MOV R2,#125
DJNZ R2,$
DJNZ R1,DELAY0_5S1
DJNZ R0,DELAY0_5S2
POP 02H
POP 01H
POP 00H
RET
DELAY_1S: PUSH 00H
PUSH 01H
PUSH 02H
MOV R0,#10
DELAY1S2: MOV R1,#200
DELAY1S1: MOV R2,#125
DJNZ R2,$
DJNZ R1,DELAY1S1
DJNZ R0,DELAY1S2
POP 02H
POP 01H
POP 00H
RET
DELAY3_5S: PUSH 00H
PUSH 01H
PUSH 02H
MOV R0,#35
DELAY3_5S2:MOV R1,#200
DELAY3_5S1:MOV R2,#125
DJNZ R2,$
DJNZ R1,DELAY3_5S1
DJNZ R0,DELAY3_5S2
POP 02H
POP 01H
POP 00H
RET
DELAY15S: PUSH 00H
PUSH 01H
PUSH 02H
MOV R0,#150
DELAY15S2:MOV R1,#200
DELAY15S1:MOV R2,#125
DJNZ R2,$
DJNZ R1,DELAY15S1
DJNZ R0,DELAY15S2
POP 02H
POP 01H
POP 00H
RET
DELAY_20M: PUSH 00H
PUSH 01H
PUSH 02H
PUSH 03H
push 04h
MOV R0,#2
clr time_end
DELAY20M0: mov r4,#5
DELAY20M3: MOV R1,#240
DELAY20M2: MOV R2,#250
DELAY20M1: MOV R3,#250
DJNZ R3,$
DJNZ R2,DELAY20M1
jnb time_end,delay20m5
jnb on_off,delay20m4
delay20m5: DJNZ R1,DELAY20M2
djnz r4,DELAY20M3
setb time_end
DJNZ R0,DELAY20M0
delay20m6: pop 04h
POP 03H
POP 02H
POP 01H
POP 00H
RET
delay20m4: setb ea
call di1
clr ea
clr tr0
clr tr1
mov p1,#0ffh
mov p3,#0ffh
ajmp delay20m6
DI1: clr ALARM_OFF
mov loop2_t,#06
di1_0: MOV R3,#208
DI1_1: SETB ALARM
CALL DELAY200US
CLR ALARM
CALL DELAY200US
DJNZ R3,DI1_1
dec loop2_t
mov a,loop2_t
jnz di1_0
setb ALARM_OFF ;***
RET
DI2: CALL DI1
CALL DELAY0_3S
CALL DI1
CALL DELAY0_3S
RET
DI3: CALL DI1
CALL DELAY0_3S
CALL DI1
CALL DELAY0_3S
CALL DI1
CALL DELAY0_3S
RET
DI4: CALL DI1
CALL DELAY0_3S
CALL DI1
CALL DELAY0_3S
CALL DI1
CALL DELAY0_3S
CALL DI1
CALL DELAY0_3S
RET
Dj1A: clr ALARM_OFF
dj1_0: MOV R3,#93;139
Dj1_1: SETB ALARM
CALL DELAY600US
CALL DELAY600US
call delay600us
CLR ALARM
CALL DELAY600US
call delay600us
CALL DELAY600US
DJNZ R3,Dj1_1
setb ALARM_OFF ;***
RET
Dj1: CALL DJ1A
CALL DELAY0_6S
CALL DELAY_1S
CALL DELAY_1S
CALL DELAY_1S
RET
Dj2: call dj1A
call delay0_6s
call dj1A
call delay0_6s
call delay_1s
call delay_1s
ret
Djj2: call dj1A
call dj1A
call delay0_6s
call dj1A
call dj1A
call delay_1s
call delay_1s
ret
Dj3: call dj1A
call delay0_6s
call dj1A
call delay0_6s
call dj1A
call delay0_6s
call delay_1s
ret
Dj4: call dj1A
call delay0_6s
call dj1A
call delay0_6s
call dj1A
call delay0_6s
call dj1A
call delay0_6s
RET
;风机1检测
FAN1CHECK: ;SETB TIMER_FLG
SETB TR0
mov loop1_t,#05
FAN1CHECK1:JB TIME_END,FAN1JUST
JB FAN1_CHK,FAN1CHECK1
INC FAN1_SPEED
FAN1CHECK2:JB FAN1_CHK,FAN1CHECK1
JB TIME_END,FAN1JUST
AJMP FAN1CHECK2
FAN1JUST: CLR TR0
CLR TIME_END
MOV A,FAN1_SPEED
CJNE A,#20,FAN1JUST1
FAN1JUST1: JNC FAN1JUST2
SETB FAN1_FLG
AJMP FAN1_EXIT
FAN1JUST2: CLR FAN1_FLG
FAN1_EXIT: MOV FAN1_SPEED,#0
RET
;风机2测速
FAN2CHECK: SETB TR0
mov loop1_t,#05
FAN2CHECK1:JB TIME_END,FAN2JUST
JB FAN2_CHK,FAN2CHECK1
INC FAN2_SPEED
FAN2CHECK2:JB FAN2_CHK,FAN2CHECK1
JB TIME_END,FAN2JUST
AJMP FAN2CHECK2
FAN2JUST: CLR TR0
CLR TIME_END
MOV A,FAN2_SPEED
CJNE A,#20,FAN2JUST1
FAN2JUST1: JNC FAN2JUST2
SETB FAN2_FLG
AJMP FAN2_EXIT
FAN2JUST2: CLR FAN2_FLG
FAN2_EXIT: MOV FAN2_SPEED,#0
RET
;制式处理
MODE_PRG: CLR MODE_N_P
clr mode_flg
CLR TIME_END
MOV mode_freq,#0
JB MODE_COL,$
jnb mode_col,$
SETB TR0
mov loop1_t,#05
MODE_PRG1: jb time_end,modejust
JB MODE_COL,MODE_PRG1
inc mode_freq
MODE_PRG2: JB MODE_COL,MODE_PRG1
JB TIME_END,MODEJUST
AJMP MODE_PRG2
MODEJUST: CLR TR0
CLR TIME_END
MOV A,MODE_FREQ
CJNE A,#27,MODEJUST1
MODEJUST0: setb mode_ctrl
SETB MODE_N_P
ret
MODEJUST1: jc MODEJUST0
modejust4: clr mode_ctrl
CLR MODE_N_P
MODEJUST2: RET
;MODEJUST3: jc modejust2
;定时器0中断
TIMER0_INT:INC R7
CJNE R7,#200,FAN_TIMER0
dec loop1_t
mov a,loop1_t
jnz fan_timer01
SETB TIME_END
MOV R7,#0
CLR TR0
MOV TH0,#06H
MOV TL0,#06H
RETI
fan_timer01:mov r7,#0
FAN_TIMER0:CLR TIME_END
RETI
;定时器1中断
TIMER1_INT:INC R6
JB SLOW_FLG,SLOWFLSH
JB MEDM_FLG,MEDMFLSH
JB QUIK_FLG,QUIKFLSH
MOV TH1,#3CH
MOV TL1,#0AFH
RETI
;慢闪处理
SLOWFLSH: CJNE R6,#1,SLOWFLSH1
CLR LAMP_SW
AJMP T1_EXIT
SLOWFLSH1: CJNE R6,#10,SLOWFLSH2
SETB LAMP_SW
AJMP T1_EXIT
SLOWFLSH2: CJNE R6,#50,T1_EXIT
MOV R6,#0
AJMP T1_EXIT
;中闪处理
MEDMFLSH: CJNE R6,#1,MEDMFLSH1
CLR LAMP_SW
AJMP T1_EXIT
MEDMFLSH1: CJNE R6,#10,MEDMFLSH2
SETB LAMP_SW
AJMP T1_EXIT
MEDMFLSH2: CJNE R6,#17,MEDMFLSH3
CLR LAMP_SW
AJMP T1_EXIT
MEDMFLSH3: CJNE R6,#27,MEDMFLSH4
SETB LAMP_SW
AJMP T1_EXIT
MEDMFLSH4: CJNE R6,#50,T1_EXIT
MOV R6,#0
AJMP T1_EXIT
;快闪处理
QUIKFLSH: CJNE R6,#1,QUIKFLSH1
CLR LAMP_SW
AJMP T1_EXIT
QUIKFLSH1: CJNE R6,#6,QUIKFLSH2
SETB LAMP_SW
AJMP T1_EXIT
QUIKFLSH2: CJNE R6,#12,QUIKFLSH3
CLR LAMP_SW
AJMP T1_EXIT
QUIKFLSH3: CJNE R6,#18,QUIKFLSH4
SETB LAMP_SW
AJMP T1_EXIT
QUIKFLSH4: CJNE R6,#24,QUIKFLSH5
CLR LAMP_SW
AJMP T1_EXIT
QUIKFLSH5: CJNE R6,#30,QUIKFLSH6
SETB LAMP_SW
AJMP T1_EXIT
QUIKFLSH6: CJNE R6,#36,QUIKFLSH7
CLR LAMP_SW
AJMP T1_EXIT
QUIKFLSH7: CJNE R6,#42,QUIKFLSH8
SETB LAMP_SW
ajmp T1_EXIT
QUIKFLSH8: CJNE R6,#50,t1_exit
mov r6,#0
T1_EXIT: MOV TH1,#3CH
MOV TL1,#0AFH
RETI
SLOW_FLASH:SETB SLOW_FLG
CLR MEDM_FLG
CLR QUIK_FLG
SETB TR1
RET
MEDM_FLASH:SETB MEDM_FLG
CLR QUIK_FLG
CLR SLOW_FLG
SETB TR1
RET
QUIK_FLASH:SETB QUIK_FLG
CLR SLOW_FLG
CLR MEDM_FLG
SETB TR1
RET
LAMP_ON: CLR LAMP_SW
CLR TR1
RET
LAMP_OFF: SETB LAMP_SW
CLR TR1
RET
REST222S: SETB RST222S
CALL DELAY0_3S
CLR RST222S
call delay0_3s
RET
程序打包:https://static.assets-stash.eet-china.com/album/old-resources/2008/12/11/d3ab497a-5fef-4d7b-a7d7-57134bba44ed.rar
原理图打包:https://static.assets-stash.eet-china.com/album/old-resources/2008/12/11/8221cf34-05d8-4484-8b8f-1e1419ca545f.rar
PCB打包:https://static.assets-stash.eet-china.com/album/old-resources/2008/12/11/e9d59209-606d-42af-a377-4c79785bef8c.rar
用户420349 2010-2-17 16:43
用户149863 2009-8-8 16:22
用户116683 2008-12-12 10:23