Subversion Repositories svnkaklik

Rev

Blame | Last modification | View Log | Download

;--- Macro na spozdeni 1ms az 255ms ---
Delay   macro   _ms
        movlw   _ms
        movwf   xxx
        call    Delay1ms        
        endm

;--- Spozdeni v nasobcich 1.002ms ----
Jednou:
        nop
Delay1ms:
        movlw   99              ; 1 ms
        movwf   yyy             ; goto 2 takty decfsz 1 kdyz 1 jinak 2
        call    us10

        decfsz  xxx, f
        goto    Jednou
;---------------------------------
        return                  ;2us

;--- Spozdeni v nasobcich 10us ----
us10:                   ; Prodleva (yyy * 10us)+3us
                
        nop
        nop
        nop
        nop
        nop
        nop
        decfsz  yyy, f
        goto    us10
        nop
        nop
        nop
        nop
        nop
        return
        ;-------------------------

;----------------------------
; Definice promenych
;----------------------------

        cblock  

        yyy
        xxx

        endc