Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Ladeni SAA1057 s PIC16F84
- ; -------------------------
- ; (C) 1999-2001 Piratske radio - www.pira.cz
- ;
- ; Verze 5 - opakovany upload v danem intervalu
- ; Pro assembler MPASM - www.microchip.com
- ;
- ; Zapojeni: DAT 3 (OUT)
- ; DLEN 2 (OUT) TUNED 18 (OUT)
- ; CLB 1 (OUT) jumpery 6-13 (IN)
- LIST P=PIC16F84A
- #include <p16F84a.inc>
- __CONFIG _CP_OFF & _WDT_ON & _PWRTE_ON & _RC_OSC
- DAT EQU 4
- DLEN EQU 3
- CLB EQU 2
- TUNED EQU 1
- PORTA EQU 5
- PORTB EQU 6
- COUNT EQU 0Ch
- WORKA EQU 0Dh
- WORKB EQU 0Eh
- CNT1 EQU 0Fh
- CNT2 EQU 10h
- CNT3 EQU 11h
- TRISA EQU 85h
- STATUS EQU 3
- OPT EQU 81h
- W EQU 0
- f EQU 1
- C EQU 0
- Z EQU 2
- CLRWDT
- BCF PORTA,TUNED
- BSF STATUS,5
- CLRF TRISA
- MOVLW B'01111111'
- MOVWF OPT ;pull-ups and WDT on
- BCF STATUS,5
- START CLRWDT
- CLRF PORTA
- CLRF COUNT
- MOVLW B'00100000'
- MOVWF WORKA
- MOVLW B'00111010'
- MOVWF WORKB
- SOUCET CLRWDT
- MOVF PORTB,W
- BCF STATUS,C
- ADDWF WORKB,f
- BTFSC STATUS,C
- INCF WORKA
- INCF COUNT
- MOVLW 0Ah
- SUBWF COUNT,W
- BTFSS STATUS,Z
- GOTO SOUCET
- MOVLW 0xFF
- MOVWF COUNT
- ZNOVA CLRWDT
- CALL PULS
- CALL PULS
- CALL PULS
- CALL PULS
- CALL PULS
- CALL PULS
- CALL PULS
- CALL PULS
- CALL PULS
- CALL PULS
- CALL PULS
- CALL PULS
- CALL PULS
- CALL PULS ;14 PULZU NA CLB
- BCF PORTA,DAT
- BSF PORTA,DLEN ;DLEN 1
- CALL PULS ;0
- BSF PORTA,DAT
- CALL PULS ;1
- CALL PULS ;2
- BCF PORTA,DAT
- CALL PULS ;3
- BSF PORTA,DAT
- CALL PULS ;4
- CALL PULS ;5
- CALL PULS ;6
- BCF PORTA,DAT
- CALL PULS ;7
- BSF PORTA,DAT
- CALL PULS ;8
- BTFSS COUNT,7
- BSF PORTA,DAT
- BTFSC COUNT,7
- BCF PORTA,DAT
- CALL PULS ;9
- BCF PORTA,DAT
- CALL PULS ;10
- CALL PULS ;11
- CALL PULS ;12
- CALL PULS ;13
- BSF PORTA,DAT
- CALL PULS ;14
- BCF PORTA,DAT
- CALL PULS ;15
- BSF PORTA,DAT
- CALL PULS ;16
- BCF PORTA,DAT
- BCF PORTA,DLEN
- CALL PULS
- NOP
- NOP
- NOP
- BSF PORTA,DLEN
- CALL PULS ;0
- CALL PULS ;1
- CALL PULS ;2
- BSF PORTA,DAT
- CALL PULS ;3
- BCF PORTA,DAT
- CALL PULS ;4
- BTFSS WORKA,3
- BCF PORTA,DAT
- BTFSC WORKA,3
- BSF PORTA,DAT
- CALL PULS ;5
- BTFSS WORKA,2
- BCF PORTA,DAT
- BTFSC WORKA,2
- BSF PORTA,DAT
- CALL PULS ;6
- BTFSS WORKA,1
- BCF PORTA,DAT
- BTFSC WORKA,1
- BSF PORTA,DAT
- CALL PULS ;7
- BTFSS WORKA,0
- BCF PORTA,DAT
- BTFSC WORKA,0
- BSF PORTA,DAT
- CALL PULS ;8
- BTFSS WORKB,7
- BCF PORTA,DAT
- BTFSC WORKB,7
- BSF PORTA,DAT
- CALL PULS ;9
- BTFSS WORKB,6
- BCF PORTA,DAT
- BTFSC WORKB,6
- BSF PORTA,DAT
- CALL PULS ;10
- BTFSS WORKB,5
- BCF PORTA,DAT
- BTFSC WORKB,5
- BSF PORTA,DAT
- CALL PULS ;11
- BTFSS WORKB,4
- BCF PORTA,DAT
- BTFSC WORKB,4
- BSF PORTA,DAT
- CALL PULS ;12
- BTFSS WORKB,3
- BCF PORTA,DAT
- BTFSC WORKB,3
- BSF PORTA,DAT
- CALL PULS ;13
- BTFSS WORKB,2
- BCF PORTA,DAT
- BTFSC WORKB,2
- BSF PORTA,DAT
- CALL PULS ;14
- BTFSS WORKB,1
- BCF PORTA,DAT
- BTFSC WORKB,1
- BSF PORTA,DAT
- CALL PULS ;15
- BCF PORTA,DAT
- CALL PULS ;16
- BCF PORTA,DLEN
- CALL PULS
- INCF COUNT
- NOP
- NOP
- NOP
- BTFSS COUNT,3
- GOTO ZNOVA
- BSF PORTA,DLEN ;DLEN 1
- CALL PULS ;0
- BSF PORTA,DAT
- CALL PULS ;1
- CALL PULS ;2
- BCF PORTA,DAT
- CALL PULS ;3
- CALL PULS ;4
- CALL PULS ;5
- CALL PULS ;6
- BSF PORTA,DAT
- CALL PULS ;7
- CALL PULS ;8
- CALL PULS ;9
- BCF PORTA,DAT
- CALL PULS ;10
- CALL PULS ;11
- CALL PULS ;12
- CALL PULS ;13
- BSF PORTA,DAT
- CALL PULS ;14
- BCF PORTA,DAT
- CALL PULS ;15
- BSF PORTA,DAT
- CALL PULS ;16
- BCF PORTA,DAT
- BCF PORTA,DLEN
- CALL PULS
- NOP
- NOP
- NOP
- BSF PORTA,DLEN
- CALL PULS ;0
- CALL PULS ;1
- CALL PULS ;2
- BSF PORTA,DAT
- CALL PULS ;3
- BCF PORTA,DAT
- CALL PULS ;4
- BTFSS WORKA,3
- BCF PORTA,DAT
- BTFSC WORKA,3
- BSF PORTA,DAT
- CALL PULS ;5
- BTFSS WORKA,2
- BCF PORTA,DAT
- BTFSC WORKA,2
- BSF PORTA,DAT
- CALL PULS ;6
- BTFSS WORKA,1
- BCF PORTA,DAT
- BTFSC WORKA,1
- BSF PORTA,DAT
- CALL PULS ;7
- BTFSS WORKA,0
- BCF PORTA,DAT
- BTFSC WORKA,0
- BSF PORTA,DAT
- CALL PULS ;8
- BTFSS WORKB,7
- BCF PORTA,DAT
- BTFSC WORKB,7
- BSF PORTA,DAT
- CALL PULS ;9
- BTFSS WORKB,6
- BCF PORTA,DAT
- BTFSC WORKB,6
- BSF PORTA,DAT
- CALL PULS ;10
- BTFSS WORKB,5
- BCF PORTA,DAT
- BTFSC WORKB,5
- BSF PORTA,DAT
- CALL PULS ;11
- BTFSS WORKB,4
- BCF PORTA,DAT
- BTFSC WORKB,4
- BSF PORTA,DAT
- CALL PULS ;12
- BTFSS WORKB,3
- BCF PORTA,DAT
- BTFSC WORKB,3
- BSF PORTA,DAT
- CALL PULS ;13
- BTFSS WORKB,2
- BCF PORTA,DAT
- BTFSC WORKB,2
- BSF PORTA,DAT
- CALL PULS ;14
- BTFSS WORKB,1
- BCF PORTA,DAT
- BTFSC WORKB,1
- BSF PORTA,DAT
- CALL PULS ;15
- BCF PORTA,DAT
- CALL PULS ;16
- BCF PORTA,DLEN
- CALL PULS
- CLRF CNT1
- CLRF CNT2
- CLRF CNT3
- CEKANI CLRWDT
- INCF CNT1
- BTFSS STATUS,Z
- GOTO CEKANI2
- INCF CNT2
- BTFSC CNT2,5
- INCF CNT3
- CEKANI2 BTFSS CNT3,0
- GOTO CEKANI
- LOOP CLRWDT
- BSF PORTA,TUNED
- GOTO LOOP
- PULS BSF PORTA,CLB
- BCF PORTA,CLB
- RETURN
- END
- CONFIG B'11111111111111'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement