專注差異化嵌入式產(chǎn)品解決方案 給智能產(chǎn)品定制注入靈魂給予生命
提供開發(fā)工具、應(yīng)用測試 完善的開發(fā)代碼案例庫分享
從全面的產(chǎn)品導(dǎo)入到強大技術(shù)支援服務(wù) 全程貼心伴隨服務(wù),創(chuàng)造無限潛能!
include
status equ 03h ;2004/4/28
rp0 equ 05h ;
z equ 02h ;1-2-3-9-1
pcl equ 02h
portd equ 08h
trisd equ 88h
mm equ 20h
Count equ 22h
Count1 equ 23h
Count2 equ 24h
org 10
start
bsf status,rp0
clrf trisd
bcf status,rp0
movlw 0
movwf mm
main
call table ;mm=0查表返回后mm=b'11111000'
movwf portd
call delay
incf mm
movlw 0x09 ; if mm=5 goto start,mm become zero
subwf mm,0
btfsc status,z
goto start
goto main
delay
clrf Count
clrf Count1
movlw 0x0f
movwf Count2
PP
decfsz Count,f
goto PP
decfsz Count1,f
goto PP
decfsz Count2,f
goto PP
return
table
movf mm,0
addwF PCL,1
retlw b'00000110' ;1
retlw b'01011011'
retlw b'01001111'
retlw b'01100110'
retlw b'01101101' ;5
retlw b'01111101'
retlw b'00000111'
retlw b'01111111'
retlw b'01101111'
retlw b'00111111' ;0
end