0,0 → 1,76 |
Sinchro: |
bsf PORTB, vys |
call Delay10us |
call Delay10us |
call Delay10us |
bcf PORTB, vys ; 1. impuls (30us) |
call Delay10us |
call Delay10us |
call Delay10us |
bsf PORTB, vys |
call Delay10us |
call Delay10us |
bcf PORTB, vys ; 2. impuls (20us) |
call Delay10us |
call Delay10us |
bsf PORTB, vys |
call Delay10us |
bcf PORTB, vys ; 3. impuls (10us) |
call Delay10us |
|
;return |
|
;------------------------- |
Protokol: |
movlw 8 |
movwf Bity ; nastaveni slova |
call Sinchro |
VysBit: |
btfss Ramec, 0 |
call frek0 |
call frek1 |
;------------------------- |
Rotace: |
rrf Ramec, f |
decfsz Bity, f |
goto VysBit |
return |
|
;------------------------- |
frek0: |
movlw 60 |
movwf Frek |
smycka1: |
bsf PORTB, vys ; 2000 Hz 60 impulsu |
Delay 50 |
bcf PORTB, vys |
Delay 50 |
decfsz Frek,f |
goto smycka1 |
goto Rotace |
;------------------------- |
frek1: |
movlw 45 |
movwf Frek |
smycka2: |
bsf PORTB, vys ; 1500 Hz 45 impulsu |
Delay 150 |
bcf PORTB, vys |
Delay 150 |
decfsz Frek,f |
goto smycka2 |
goto Rotace |
;------------------------- |
|
|
;---------------------------- |
; Definice promenych |
;---------------------------- |
|
cblock |
|
Frek |
Bity |
Ramec |
|
endc |