PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Suche Knight Rider Code



djdune
09.07.2004, 15:45
Hi!
Hat jemand von euch einen fertigen, funktionierenden Knight rider Lauflicht code, der funktioniert? (für 8 Ausgänge)
wäre sehr dankbar, da meiner bissl umständlich programmiert ist

09.07.2004, 18:25
wenn er funktioniert is doch ok! :P

hast du den in assembler geschrieben?

poste doch mal den quellcode




goblin

djdune
10.07.2004, 12:00
Ein Lauflicht das ich mal geschickt bekommen hab umgeschrieben.

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