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=16F628 ;tell assembler what chip we are using
- INCLUDE "P16F628A.INC" ;include the defaults for the chip
- ERRORLEVEL 0, -302 ;suppress bank selection messages
- __CONFIG _BODEN_ON & _CP_OFF & _PWRTE_ON & _WDT_ON & _LVP_OFF & _MCLRE_ON & _RC_OSC_CLKOUT
- ; __CONFIG _BODEN_ON & _CP_OFF & _PWRTE_ON & _WDT_ON & _LVP_OFF & _MCLRE_ON & _INTOSC_OSC_CLKOUT
- #DEFINE BANK0 BCF STATUS,RP0 ;SETA BANK 0 DE MEMÓRIA
- #DEFINE BANK1 BSF STATUS,RP0 ;SETA BANK 1 DE MAMÓRIA
- CBLOCK 0x20 ;start of general purpose registers
- COUNT
- WORKA
- WORKB
- CNT1
- CNT2
- CNT3
- ENDC
- DAT EQU 4
- DLEN EQU 3
- CLB EQU 2
- TUNED EQU 1
- INICIO
- CLRWDT
- BCF PORTA,TUNED
- BSF STATUS,5
- CLRF TRISA
- MOVLW B'01111111'
- MOVWF OPTION_REG ;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
- ; BSF PORTA,TUNED
- CLRF CNT1
- CLRF CNT2
- CLRF CNT3
- CEKANI CLRWDT
- INCF CNT1
- BTFSS STATUS,Z
- GOTO CEKANI2
- INCF CNT2
- BTFSC STATUS,Z
- ; INCF CNT3
- ; BSF PORTA,TUNED
- CALL LED_ON
- CEKANI2 BTFSS CNT3,5 ;CCCCCCCAAA 30 MIN.
- GOTO CEKANI
- MOVLW 0xFF
- MOVWF COUNT
- REPEAT 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
- BCF PORTA,DAT
- CALL PULS ;4
- CALL PULS ;5
- CALL PULS ;6
- BSF 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
- NOP
- NOP
- NOP
- INCF COUNT
- BTFSS COUNT,3
- GOTO REPEAT
- CLRF CNT1
- CLRF CNT2
- CLRF CNT3
- GOTO CEKANI
- PULS BSF PORTA,CLB
- BCF PORTA,CLB
- RETURN
- LED_ON
- BSF PORTA,TUNED
- INCF CNT3,F
- RETURN
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement