Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- d1 EQU 0x22
- X EQU 0x30 ;задержка
- Y EQU 0x32 ;задержка
- A EQU 0x34 ;задержка
- ORG 0x0000
- BCF PCLATH,3
- BCF PCLATH,4
- GOTO L0001
- ORG 0x0004
- RETFIE
- L0001:
- ; конфигурация портов
- bsf status,5
- bcf trisb,0
- bcf trisb,1
- bcf trisb,2
- bcf trisb,3
- bcf trisb,4
- bcf trisb,5
- bcf trisb,6
- bcf trisb,7
- bcf status,5
- goto start
- ;задержка
- delay:
- MOVLW 0x48
- MOVWF a
- mz3:
- MOVLW 0x2E
- MOVWF y
- mz2:
- MOVLW 0x64
- MOVWF X
- mz1:
- DECFSZ x,f
- GOTO mz1
- DECFSZ y,f
- GOTO mz2
- DECFSZ a,f
- GOTO mz3
- RETURN
- ;основная программа
- start:
- bsf portb,7
- call delay
- bcf portb,6
- call delay
- bcf portb,5
- call delay
- bcf portb,4
- call delay
- bcf portb, 3
- call delay
- bcf portb, 2
- call delay
- bcf portb, 1
- call delay
- bcf portb, 0
- goto start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement