?? sleep.asm
字號:
;==========================================================
;
; 模塊: FM發(fā)射模塊控制代碼
;
; 版本: 1.01
;
; 日期: 2007-7-28
;
; 作者: 施探宇
;
; 說明: Zi2020 應(yīng)用圖
;
; +-----+
; (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信號強(qiáng)度
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.
;===============================================
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -