?? at89c2051-38khz.asm
字號(hào):
;發(fā)高電平時(shí),每隔26us CPL一下I/O口;發(fā)低電平時(shí)I/O口為0
;2*AT89C2051/24M
; 發(fā)送:
ks: mov tmod,#22h
mov a,#01010101b
mov th0,#230
mov tl0,#230
mov r3,#80
setb tr0
fsqs: mov r3,#160 ; 發(fā)起始位
here: jnb tf0,here ;`13US
clr tf0
cpl p3.7 ;出38k
djnz r3,here ;發(fā)完起始位
lf: mov r3,#80 ;發(fā)8位數(shù)開始
mov r4,#8
rlc a
jc bfs ;0發(fā)1不發(fā)
here1: jnb tf0,here1
clr tf0
cpl p3.7
djnz r3,here1
djnz r4,lf ;8位發(fā)完?
ftzw: setb p3.7;發(fā)停止位
mov r3,#160
here2: jnb tf0,here2
clr tf0
djnz r3,here2
ljmp fsqs ;連發(fā)01010101
bfs: setb p3.7 ;發(fā)1
here3: jnb tf0,here3
clr tf0
djnz r3,here3
djnz r4,lf
ljmp ftzw
end
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -