微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > sonix单片机做的消毒柜

sonix单片机做的消毒柜

时间:05-11 来源:互联网 点击:

一、总体说明:

本消毒柜有紫外线和臭氧消毒,烘干厨具的功能。当正在消毒时,打开消毒柜门即刻切断紫外线和臭氧发生器。当消毒柜箱体内温度高于70℃时自动切断紫外线和臭氧发生器。

当烘干时间大于30分钟时烘20分钟后自动启动风机;当烘干时间小于30分钟时自动启动风机。

二、按键功能说明:

待机状态显示时钟,消毒时到计时显示定时消毒时间,烘干时到计时显示定时烘干时间。

开机默认状态:90分钟消毒+60分钟烘干。

1、 开/关键:在待机条件下按此键消毒柜进入工作状态(默认90分钟消毒)。在工作状态下按按此键消毒柜进入待机。待机时,消毒90分钟键、消毒45分钟键,烘干60分钟键、烘干30分钟键无效。

2、 照明键:按次键开或关消毒柜箱体照明灯。

3、 小时键:在待机条件下按此键可调整时钟的“时”;在工作状态下按按此键,将显示工作时间切换为显示时钟,延时4秒后,回到显示工作时间。

4、 分钟键:在待机条件下按此键可调整时钟的“分”;在工作状态下按按此键工作时间(以分钟为单位)。

5、 消毒90分钟键:在工作状态下按按此键,消毒柜工作与90分钟定时消毒,相应的LED指示灯亮,显示工作时间到计时。此时按分钟键可以调节定时消毒时间(从90分钟到240分钟迴圈调节)。

6、 消毒45分钟键:在工作状态下按按此键,消毒柜工作与45分钟定时消毒,相应的LED指示灯亮,显示工作时间到计时。此时按分钟键可以调节定时消毒时间(从45分钟到89分钟迴圈调节)。

7、 烘干60分钟键:在消毒工作状态下按按此键一次,显示时间切换为闪烁显示60分钟(此为默认60分钟烘干时间),若此时再按下此键,消毒柜进入烘干工作状态;若此时按下分钟键,可以调节烘干时间(从60分钟到120分钟迴圈调节),此时再按下烘干60分钟键(或15秒内无按键操作)确认闪烁时间为烘干时间并且回到消毒柜工作状态。

8、 烘干30分钟键:在消毒工作状态下按按此键一次,显示时间切换为闪烁显示30分钟(此为默认30分钟烘干时间),若此时再按下此键,消毒柜进入烘干工作状态;若此时按下分钟键,可以调节烘干时间(从30分钟到59分钟迴圈调节),此时再按下烘干30分钟键(或15秒内无按键操作)确认闪烁时间为烘干时间并且回到消毒柜工作状态。

;************************************
;sterprogram
;Crystal:3.58MHz
Chip sn8p1604a
//{{SONIX_CODE_OPTION
.Code_Option High_Clk 4M_X’tal
.Code_Option High_Clk/2 DISAble
.Code_Option Security Enable
.Code_Option Int_16K_RC Always_ON
.Code_Option Rst_P0.3 Reset
.Code_Option Watch_Dog Enable
//}}SONIX_CODE_OPTION




flag1 equ 00h
flag2 equ 01h
flag3 equ 02h
second equ 03h
hour equ 04h
minute equ 05h
Dminute equ 06h
Dsecond equ 07h
sumbuffer equ 08h
sterbuffer equ 09h
fantime equ 0ah
fanbuffer equ 0bh
databuffer equ 0ch
bufferHH equ 0dh
keybuffer equ 0eh
counter equ 0fh

sterbuffer1 equ 10h
keybuffercopy equ 11h
tonetime equ 12h
bufferH equ 13h
bufferL equ 14h
address equ 15h
delaybuffer equ 16h
timer equ 17h
counter1 equ 18h
P2copy equ 19h
P1copy equ 1ah
keycounter equ 1bh
combuffer equ 1ch
aCCbuffer equ 1dh
pflagbuffer equ 1eh
Dminute_Dry equ 1fh

displaybuffer0 equ 20h
displaybuffer1 equ 21h
displaybuffer2 equ 22h
displaybuffer3 equ 23h
displaybuffer4 equ 24h
displaybuffer5 equ 25h
displaybuffer6 equ 26h
displaybuffer7 equ 27h
displaybuffer8 equ 28h
displaybuffer9 equ 29h
ybuffer equ 2ah
zbuffer equ 2bh
rbuffer equ 2ch
timer2 equ 2dh

P5copy equ 30h
flag4 equ 31h
flashtime equ 32h
keytime equ 33h
;***********
;BITDEFINITION
;*****************

;************
DOOR EQU P0.0

DATA8 EQU P1.0
BUZZER EQU P1.1
KEY1 EQU P1.2
KEY2 EQU P1.3
COM0 EQU P1.4
COM1 EQU P1.5
COM2 EQU P1.6
COM3 EQU P1.7

DOT equ P2.2

LIGHT EQU P5.0 ;OUTPUT
STER EQU P5.1 ;OUTPUT
DRY EQU P5.2 ;OUTPUT
FAN EQU P5.3 ;OUTPUT
;**********
F_FAN EQU flag1.0
F_STER EQU flag1.1
F_DRY EQU flag1.2
F_FLASH1 equ flag1.3
TONE_ENABLE EQU flag1.4
F_NO_DOOR EQU flag1.5
F_NO_TONE equ flag1.6


F_STER90 EQU flag2.2
F_STER45 EQU flag2.3
F_DRY60 EQU flag2.1
F_DRY30 EQU flag2.0

F_ON_OFF EQU flag3.0
F_FLASH EQU flag3.1
F_LIGHT EQU flag3.2
F_KEY EQU flag3.3
F_FINISH EQU flag3.4
F_DISPLAY EQU flag3.5
F_DISPLAY1 EQU flag3.6
F_MINUTE EQU flag3.7
F_DISPLAY_FLASH equ flag4.0
F_DISPLAY_FLASH60 EQU flag4.6
F_DISPLAY_FLASH30 EQU flag4.7
F_DELAY EQU flag4.3
;*****************************************
KPOWER EQU keybuffer.6
KMINUTE EQU keybuffer.0
KLIGHT EQU keybuffer.7
KHOUR EQU keybuffer.1
KDRY60 EQU keybuffer.2
KSTER90 EQU keybuffer.4
KDRY30 EQU keybuffer.3
KSTER45 EQU keybuffer.5

;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
org 0x00
jmp Start
org 0x08
jmp Interrupt

org 0x10
Interrupt:
b0bset FWDRST
b0 MOV accbuffer,a
b0 MOV a,PFLAG
b0 MOV pflagbuffer,a
b0bts1 FTC1IRQ
jmp Interruptend01
MOV a,#131
MOV TC1C,a

b0bts1 DOOR
jmp Testdoor01
Testdoor:
b0bset F_NO_DOOR
b0bclr STER
jmp Testdoor02
Testdoor01:
b0bclr F_NO_DOOR
b0bts0 F_STER
b0bset STER
Testdoor02:
b0 MOV a,keytime
cmprs a,#0
decms keytime
nop
Tone:
b0bts0 TONE_ENABLE
b0bset BUZZER
incms tonetime
nop
b0 MOV a,tonetime
sub a,#30 ;250ms
b0bts1 FC
jmp Notone
clr tonetime
b0bclr BUZZER
b0bclr TONE_ENABLE
Notone:
incms flashtime
nop
b0 MOV a,flashtime
sub a,#125 ;500ms
b0bts1 FC
jmp Timer00
clr flashtime
b0bts0 F_FLASH1
jmp Flashtime01
b0bset F_FLASH1
jmp Timer00
Flashtime01:
b0bclr F_FLASH1

Timer00:
incms timer
nop
b0 MOV a,timer
sub a,#125 ;500ms
b0bts1 FC
jmp KeysCAN
clr timer
b0bts0 F_FLASH
jmp Timer0ok_1
b0bset F_FLASH
jmp Keyscan
Timer0ok_1:
b0bclr F_FLASH
b0bts1 F_DELAY
jmp Timer0ok_1x
decms delaybuffer
jmp Timer0ok_1x
clr flag4
b0bclr F_MINUTE
Timer0ok_1x:
incms second
nop
b0 MOV a,second
sub a,#60
b0bts1 FC
jmp Timer0ok_2
clr second
incms minute
nop
b0 MOV a,minute
sub a,#60
b0bts1 FC
jmp Timer0ok_2
clr minute
incms hour
nop
b0 MOV a,hour
sub a,#12
b0bts1 FC
jmp Timer0ok_2
clr hour
Timer0ok_2:
b0bts1 F_ON_OFF
jmp Keyscan
b0bts1 F_NO_DOOR
jmp Timer0ok_2a
b0bts0 F_STER
jmp Keyscan
Timer0ok_2a:
b0 MOV a,Dsecond
cmprs a,#0x00
jmp Timer0ok_2x
jmp Timer0ok_4
Timer0ok_2x:
decms Dsecond
nop
jmp Keyscan
Timer0ok_4:
b0 MOV a,fantime
cmprs a,#0xff
incms fantime
nop
MOV a,#59
b0 MOV Dsecond,a
decms Dminute
nop
call AdjDisplay
b0 MOV a,Dminute
cmprs a,#0xff
jmp Timer0ok_7
Timer0ok_5:
b0bts1 F_STER
jmp Timer0ok_6
b0 MOV a,Dminute_Dry
b0 MOV Dminute,a
clr Dsecond
clr flag2
clr fantime
b0bset F_DRY60
call Clrstatus01
b0bset F_DRY
b0bset DRY
jmp Keyscan
Timer0ok_6:
b0bset F_FINISH
jmp Interruptend
Timer0ok_7:
b0bts0 F_STER
jmp Keyscan

b0 MOV a,fantime
sub a,#20
b0bts1 FC
jmp Timer0ok_8
b0bset FAN
b0bset F_FAN
Timer0ok_8:
b0 MOV a,Dminute
sub a,#30
b0bts0 FC
jmp Keyscan
clr flag2
b0bset F_DRY30
b0bset FAN
b0bset F_FAN
;\\\\\\\\\\\\
Keyscan:
b0bclr COM0
b0bclr COM1
b0bclr COM2
b0bclr COM3
b0bclr DATA8
incms combuffer
nop
b0 MOV a,combuffer
cmprs a,#0x01
jmp $+2
jmp C2
cmprs a,#0x02
jmp $+2
jmp C3
cmprs a,#0x03
jmp $+2
jmp C4
C1:
clr combuffer
call Adjhour
b0 MOV a,bufferHH
cmprs a,#0x00
jmp C1_1
b0 MOV a,bufferH
cmprs a,#00
jmp $+2
jmp C1_1
b0 MOV Y,#Segtable$M
b0 MOV Z,#Segtable$L
; b0 MOV a,bufferH
add Z,a
MOV c
jmp C1_2
C1_1:
MOV a,#0x00
C1_2:
b0 MOV P2,a
b0bset COM0
b0bts1 F_ON_OFF
jmp C1_3
b0bts0 F_STER90
b0bset DATA8
C1_3:
b0bclr KMINUTE
b0bclr KSTER90
b0bts1 KEY1
b0bset KSTER90
b0bts1 KEY2
b0bset KMINUTE
jmp Interruptend
C2:
call Adjhour
b0 MOV a,bufferHH
cmprs a,#0x00
jmp C2_1
b0 MOV a,bufferL
jmp C2_2
C2_1:
b0 MOV a,bufferHH
C2_2:
b0 MOV Y,#Segtable$M
b0 MOV Z,#Segtable$L
add Z,a
MOV c
b0 MOV P2,a
b0bset COM1
b0bts0 F_ON_OFF
b0bts0 F_DELAY
b0bts0 F_FLASH
b0bset DOT
b0 MOV a,bufferHH
cmprs a,#00
b0bclr DOT
b0bts1 F_ON_OFF
jmp C2_3
b0bts0 F_STER45
b0bset DATA8
C2_3:
b0bts1 F_DISPLAY_FLASH
jmp $+7
b0bset DOT
b0bts0 F_FLASH1
b0bset DOT
b0 MOV a,bufferHH
cmprs a,#00
b0bclr DOT

b0bclr KPOWER
b0bclr KHOUR
b0bts1 KEY1
b0bset KPOWER
b0bts1 KEY2
b0bset KHOUR
jmp Interruptend
C3:

call Adjhour
b0 MOV a,bufferHH
cmprs a,#0x00
jmp C3_1
call Adjminute
C3_1:
b0 MOV a,bufferH
b0 MOV Y,#Segtable$M
b0 MOV Z,#Segtable$L
add Z,a
MOV c
b0 MOV P2,a
b0bset COM2
b0bts1 F_ON_OFF
jmp C3_3
b0bts0 F_DRY60
b0bset DATA8
C3_3:
b0bclr KDRY30
b0bclr KLIGHT
b0bts1 KEY1
b0bset KDry30
b0bts1 KEY2
b0bset KLIGHT
jmp Interruptend
C4:
call Adjhour
b0 MOV a,bufferHH
cmprs a,#0x00
jmp C4_1
call Adjminute
C4_1:
b0 MOV a,bufferL
b0 MOV Y,#Segtable$M
b0 MOV Z,#Segtable$L
add Z,a
MOV c
b0 MOV P2,a
b0bset COM3
b0bts1 F_ON_OFF
jmp C4_3
b0bts0 F_DRY30
b0bset DATA8
C4_3:
b0bclr KDRY60
b0bclr KSTER45
b0bts1 KEY1
b0bset KSTER45
b0bts1 KEY2
b0bset KDRY60

Readkeyend:
clr keycounter
b0 MOV a,keybuffer
b0 MOV databuffer,a
Readkeyend01:
MOV a,#0x08
b0 MOV counter,a
Readkeyend02:
rrcm databuffer
b0bts0 FC
incms keycounter
nop
decms counter
jmp Readkeyend02
b0 MOV a,keycounter
cmprs a,#0x01
jmp Readkeyend06
b0 MOV a,keybuffer
cmprs a,keybuffercopy
jmp Readkeyend04
b0bts0 KMINUTE
jmp Readkeyend03
b0bts1 KHOUR
jmp Readkeyend06
Readkeyend03:
b0 MOV a,keytime
cmprs a,#0
jmp Interruptend
b0bset F_NO_TONE
MOV a,#40
jmp Readkeyend05
Readkeyend04:
b0 MOV a,keybuffer
b0 MOV keybuffercopy,a
b0bclr F_NO_TONE
MOV a,#100
Readkeyend05:
b0 MOV keytime,a
b0bset F_KEY
jmp Interruptend
Readkeyend06:
b0 MOV a,keybuffer
b0 MOV keybuffercopy,a
MOV a,#100
b0 MOV keytime,a
b0bclr F_KEY
b0bclr F_NO_TONE
Interruptend:
b0bts1 F_DISPLAY_FLASH
jmp $+3
b0bts1 F_FLASH1
clr P2
Interruptend01:
clr INTRQ
b0xch a,pflagbuffer
b0xch a,PFLAG
b0xch a,accbuffer
reti
;*******************
Adjhour:
b0bts0 F_DISPLAY_FLASH
jmp Adjhour04
b0bts0 F_DELAY
jmp Adjhour01
b0bts0 F_STER
jmp Adjhour03
b0bts0 F_DRY
jmp Adjhour03
Adjhour01:
b0 MOV a,hour
cmprs a,#0x00
jmp Adjhour02
MOV a,#12
jmp Tobcd
Adjhour02:
b0 MOV a,hour
jmp Tobcd
Adjhour03:
b0 MOV a,Dminute
jmp Tobcd
Adjhour04:
b0 MOV a,Dminute_Dry
jmp Tobcd
;**************
Adjminute:
b0bts0 F_DISPLAY_FLASH
jmp Adjminute03
b0bts0 F_DELAY
jmp Adjminute01
b0bts0 F_STER
jmp Adjminute02
b0bts0 F_DRY
jmp Adjminute02
Adjminute01:
b0 MOV a,minute
jmp Tobcd
Adjminute02:
b0 MOV a,Dsecond
jmp Tobcd
Adjminute03:
MOV a,#0
;\\\\\\\\\\\\\\\\\
Tobcd:
b0 MOV bufferL,a
clr bufferHH
clr bufferH
Tobcd01:
b0 MOV a,bufferL
sub a,#10
b0bts1 FC
jmp Tobcd02
b0 MOV bufferL,a
incms bufferH
jmp Tobcd01
Tobcd02:
add a,#10
b0 MOV bufferL,a
Tobcd03:
b0 MOV a,bufferH
sub a,#10
b0bts1 FC
jmp Tobcd04
b0 MOV bufferH,a
incms bufferHH
jmp Tobcd03
Tobcd04:
add a,#10
b0 MOV bufferH,a
ret
;\\\\\\\\\\

;**********************
Clrstatus:
b0bclr F_ON_OFF
b0bclr F_FINISH
Clrstatus01:
clr flag1
clr fantime
b0bclr DRY
b0bclr STER
b0bclr FAN
ret
;\\\\\\\\
Sum:
MOV a,#7
b0 MOV counter,a
clr Y
clr Z
b0 MOV a,@YZ
Verify01:
incms Z
add a,@YZ
decms counter
jmp Verify01
b0 MOV databuffer,a
ret
;*****************
Start:
clr OSCM
clr PFLAG
MOV a,#11110011b
b0 MOV P1M,a
MOV a,#11111111b
b0 MOV P2M,a
b0 MOV P5M,a
@SET_PUR 0x23

call Sum
MOV a,databuffer
cmprs a,sumbuffer
jmp Verify03
MOV a,#0x09
b0 MOV counter,a
clr Y
clr Z
Verify02:
b0 MOV a,@YZ
cmprs a,#0x00
jmp Verify04
incms Z
nop
decms counter
jmp Verify02
Verify03:
clr P1
clr P2
clr P5
Init:
clr Y
clr Z
Init01:
MOV a,#0
b0 MOV @YZ,a
incms Z
MOV a,#0x7f
cmprs a,Z
jmp Init01
b0bset TONE_ENABLE
jmp Init02
Verify04:
b0 MOV a,P1copy
b0 MOV P1,a
b0 MOV a,P2copy
b0 MOV P2,a
b0 MOV a,P5copy
b0 MOV P5,a
Init02:
MOV a,#0xb0 ;1:32
b0 MOV TC1M,a
MOV a,#131
b0 MOV TC1C,a
b0bset FTC1IEN
b0bset FGIE
clr INTRQ
Main:
b0bset FWDRST
call Sum
b0 MOV a,databuffer
b0 MOV sumbuffer,a
b0 MOV a,P1
b0 MOV P1copy,a
b0 MOV a,P2
b0 MOV P2copy,a
b0 MOV a,P5
b0 MOV P5copy,a

b0bts1 F_FINISH
jmp main00
call Clrstatus
jmp Keyactive01

main00:
b0bts1 F_KEY
jmp Main
b0bclr F_KEY
b0bts0 KPOWER
jmp Poweractive
b0bts0 KLIGHT
jmp Lightactive
b0bts0 KHOUR
jmp Houractive
b0bts0 KMINUTE
jmp Minuteactive
b0bts1 F_ON_OFF
jmp Main
b0bts0 KSTER90
jmp Ster90active
b0bts0 KSTER45
jmp Ster45active
b0bts0 KDRY30
jmp Dry30active
b0bts1 KDRY60
jmp Main
;\\\\\\\\\\\\\\\\\\\\\\\\\\\
Dry60active:
b0bts0 F_STER
jmp Dry60active02
Dry60active01:
clr flag2
b0bset F_DRY60
call Clrstatus01
MOV a,#60
jmp Dry30active02
Dry60active02:
b0bts0 F_DISPLAY_FLASH60
jmp Dry60active04
b0bset F_DISPLAY_FLASH60
b0bclr F_DISPLAY_FLASH30
b0bset F_DISPLAY_FLASH
b0bclr F_MINUTE
b0 MOV a,Dminute_dry
sub a,#60
b0bts0 FC
jmp Dry60active03
MOV a,#60
b0 MOV Dminute_dry,a
Dry60active03:
MOV a,#10
b0 MOV delaybuffer,a
b0bset F_DELAY
jmp Keyactive01
Dry60active04:
clr flag4
b0bts1 F_MINUTE
jmp Dry60active01
b0bclr F_MINUTE
jmp Keyactive01
;\\\\\\\\\\\\\\\\\\\\\\\\\\\
;********************
Poweractive:
b0bts1 F_ON_OFF
jmp Poweractive01
call Clrstatus
clr flag4
jmp Keyactive01
Poweractive01:
b0bset F_ON_OFF
jmp Ster90active
;***********
Dry30active:
b0bts0 F_STER
jmp Dry30active03
Dry30active01:
clr flag2
b0bset F_DRY30
call Clrstatus01
MOV a,#30
b0bset FAN
b0bset F_FAN
Dry30active02:
b0bset F_DRY
b0bset DRY
;\\\\\\\\\\\\\\\\\\\\\\\\\\\
Keyactive:
b0 MOV Dminute,a
clr Dsecond
Keyactive01:
clr flashtime
b0bset F_FLASH1
b0bts0 F_NO_TONE
jmp Main
b0bset TONE_ENABLE
clr tonetime
jmp Main
;*******************
Dry30active03:
b0bts0 F_DISPLAY_FLASH30
jmp Dry30active04
b0bset F_DISPLAY_FLASH30
b0bclr F_DISPLAY_FLASH60
b0bset F_DISPLAY_FLASH
b0bclr F_MINUTE
b0 MOV a,Dminute_dry
sub a,#60
b0bts1 FC
jmp Dry60active03
MOV a,#30
b0 MOV Dminute_dry,a
jmp Dry60active03
Dry30active04:
clr flag4
b0bts1 F_MINUTE
jmp Dry30active01
b0bclr F_MINUTE
jmp Keyactive01
;\\\\\\\\\\\\\\\\\\\\\\\\\\\
Lightactive:
b0bts0 F_LIGHT
jmp Lightactive01
b0bset F_LIGHT
b0bset LIGHT
jmp Keyactive01
Lightactive01:
b0bclr F_LIGHT
b0bclr LIGHT
jmp Keyactive01
;\\\\\\\\\\\\\\\\\\\\\\\\\\\
Houractive:
clr flag4
b0bts0 F_ON_OFF
jmp Houractive02
Houractive01:
incms hour
nop
b0 MOV a,hour
sub a,#12
b0bts0 FC
clr hour
jmp Keyactive01
Houractive02:
MOV a,#0x05
b0 MOV delaybuffer,a
b0bts0 F_DELAY
jmp Houractive01
b0bset F_DELAY
jmp Keyactive01
;\\\\\\\\\\\\\\\\\\\\\\\\\\\
Minuteactive:
b0bts0 F_ON_OFF
jmp Minuteactive02
Minuteactive01:
incms minute
nop
b0 MOV a,minute
sub a,#60
b0bts0 FC
clr minute
jmp Keyactive01
Minuteactive02:
b0bts0 F_DISPLAY_FLASH30
jmp Dry30_time_ster
b0bts0 F_DISPLAY_FLASH60
jmp Dry60_time_ster
incms Dminute
nop
b0bts0 F_STER90
jmp Ster90_time
b0bts0 F_STER45
jmp Ster45_time
b0bts0 F_DRY60
jmp Dry60_time
b0bts0 F_DRY30
jmp Dry30_time
b0bts0 F_DELAY
jmp Minuteactive01
jmp Main
Dry30_time:
b0 MOV a,Dminute
sub a,#60
b0bts1 FC
jmp Keyactive01
MOV a,#30
jmp Keyactive
Dry60_time:
b0 MOV a,Dminute
sub a,#121
b0bts1 FC
jmp Keyactive01
MOV a,#60
jmp Keyactive
Ster45_time:
b0 MOV a,Dminute
sub a,#90
b0bts1 FC
jmp Keyactive01
MOV a,#45
jmp Keyactive
Ster90_time:
b0 MOV a,Dminute
sub a,#241
b0bts1 FC
jmp Keyactive01
MOV a,#90
jmp Keyactive
;\\\\\\\\\\\\\\\\\\\\\\\\\\\
Dry30_time_ster:
incms Dminute_dry
nop
b0 MOV a,Dminute_dry
sub a,#60
b0bts1 FC
jmp Dry60_time_ster01
MOV a,#30
b0 MOV Dminute_dry,a
jmp Dry60_time_ster01
Dry60_time_ster:
incms Dminute_dry
nop
b0 MOV a,Dminute_dry
sub a,#121
b0bts1 FC
jmp Dry60_time_ster01
MOV a,#60
b0 MOV Dminute_dry,a
Dry60_time_ster01:
MOV a,#15
b0 MOV delaybuffer,a
b0bset F_DELAY
b0bset F_MINUTE
b0bclr F_FLASH
clr timer
jmp Keyactive01
;\\\\\\\\\\\\\\\\\\\\\\\\\\\
Ster90active:
MOV a,#60
b0 MOV Dminute_Dry,a
clr flag2
b0bset F_STER90
call Clrstatus01
MOV a,#90
jmp Ster45active01
;\\\\\\\\\\\\\\\\\\\\\\\\\\\
Ster45active:
MOV a,#60
b0 MOV Dminute_Dry,a
clr flag2
b0bset F_STER45
call Clrstatus01
MOV a,#45
Ster45active01:
clr flag4
b0bset F_STER
b0bset STER
jmp Keyactive
;\\\\\\\\\\\\
AdjDisplay:
b0bts1 F_STER90
jmp AdjDisplay01
MOV a,Dminute
sub a,#45
b0bts0 FC
ret
b0bclr F_STER90
b0bset F_STER45
ret
AdjDisplay01:
b0bts1 F_DRY60
ret
MOV a,Dminute
sub a,#30
b0bts0 FC
ret
b0bclr F_DRY60
b0bset F_Dry30
ret

Segtable:
; ; afbgcxed
dw 0xffeb ;b’11101011’ ;0
dw 0xff28 ;b’00101000’ ;1
dw 0xffb3 ;b’10110011’ ;2
dw 0xffb9 ;b’10111001’ ;3
dw 0xff78 ;b’01111000’ ;4
dw 0xffd9 ;b’11011001’ ;5
dw 0xffdb ;b’11011011’ ;6
dw 0xffe8 ;b’11101000’ ;7
dw 0xfffb ;b’11111011’ ;8
dw 0xfff9 ;b’11111001’ ;9

endp

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top