Ein Lauflicht das ich mal geschickt bekommen hab umgeschrieben.
Code:
list p=16f84
#include <P16f84.INC>
loops Equ 0x22
loops2 Equ 0x23
Init
bsf STATUS, RP0
movlw B'00000000'
movwf TRISB
bcf STATUS, RP0
clrf PORTB
bsf PORTB,0
Loop
call Wait
rlf PORTB,f
call Wait
rlf PORTB,f
call Wait
rlf PORTB,f
call Wait
rlf PORTB,f
call Wait
rlf PORTB,f
call Wait
rlf PORTB,f
call Wait
rlf PORTB,f
call Wait
rlf PORTB,f
call Wait
rrf PORTB,f
call Wait
rrf PORTB,f
call Wait
rrf PORTB,f
call Wait
rrf PORTB,f
call Wait
rrf PORTB,f
call Wait
rrf PORTB,f
call Wait
rrf PORTB,f
call Wait
rrf PORTB,f
goto Loop
Wait
movlw D'250'
movwf loops
Wai
movlw .110
movwf loops2
Wai2 nop
nop
nop
nop
nop
nop
decfsz loops2, F
goto Wai2
decfsz loops, F
goto Wai
retlw 0
end
Lesezeichen