📄 sleep.asm
字号:
;==========================================================
;
; 模块: FM发射模块控制代码
;
; 版本: 1.01
;
; 日期: 2007-7-28
;
; 作者: 施探宇
;
; 说明: Zi2020 应用图
;
; +-----+
; (106.7)P5.0 ===| |=== P5.1(PREV KEY)(POWER KEY)
; (107.1)P6.7 ===| |=== P5.2(NEXT KEY)
; (107.5)P6.6 ===| |=== P5.3(CE,Zi2020 高打开)
; Vdd ===| |=== Vss
; (107.9)P6.5 ===| |=== P6.0(音频检测)
; FM LED)P6.4 ===| |=== P6.1(SDA,Zi2020)
; (NC)P6.3 ===| |=== P6.2(SCL,Zi2020)
; +-----+
;
;==========================================================
include "reg.inc"
;===========================================================
; Start()
;===========================================================
ORG 0x00
jmp Start
ORG 0x01
reti
ORG 0x08
bc INT_STATU,@P6_FLAG_BIT
bc INT_STATU,@EX_FLAG_BIT
reti
;------------------------------
; 程序开始
;------------------------------
ORG 0x20
Start:
DISI ;禁止中断
call Init_Con_reg ;初始化控制寄存器
call CleanRam ;清除寄存器
call Init_Ioport ;初始化输入输出口
;ENI ;开中断
mov a,@0001110B
contw
wdtc
ior WTDCON ;禁止持门狗
mov A_buff,a
bc A_buff,@0x07
mov a,A_buff
iow WTDCON
mov P6,P6
slep
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;===========================================================
; main()
;===========================================================
main:
;判断FM信号强度
call delay_500ms
call delay_500ms
call delay_500ms
call delay_500ms
jmp main
;===========================================================
; main end
;===========================================================
;===============================================
; Includes Other Functions.
;===============================================
include "init_sys.asm"
include "time.asm"
;include "i2cproc.asm"
;include "5800.asm"
END
;===============================================
; End of file.
;===============================================
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -