Hallo Siro
Vielen Dank für deine Tipps. Haben mir sehr geholfen.
Nur habe ich das Problem das immer eine Fehlermeldung beim Kompilieren kommt.
Und zwar erkennt es die befehle org, movlw, movwf, btfss u.s.w. nicht..
Es steht immer das mein Projekt "out of date" ist...und dann kommt eine lange Liste mit den Befehlen die es nicht erkennt![]()
Unten habe ich meine aktuellste Version hinzugefügt. Mein Ziel ist es ja, etwas ähnliches wie einen Zufallsgenerator zu Programmieren nur das ich halt jedes LED einzeln aufrufe und nun neu eine kurze wartezeit eingebaut habe so das jedes LED einzeln nacheinander aufleuchtet...und ich das ganze mit einem Taster starte und dann mit dem selben Taster unterbreche und es bei einem LED stehen bleibt...
Code:#include <p18F4520.inc> org 0x0000 movlw B'00000000' movwf TRISA movlw B'00000000' movwf TRISB movlw B'00010000' movwf TRISC Schleife movlw B'00000010' ;LED 1 movwf PORTA btfss PORTC, 4 goto Variante_0 goto Variante_1 call zeit_kurz Variante_0 movlw B'00100000' ;LED 2 movwf PORTA btfss PORTC, 4 goto Variante_2 goto Variante_3 call zeit_kurz Variante_2 movlw B'00000001' ;LED 3 movwf PORTA btfss PORTC, 4 goto Variante_4 goto Variante_5 call zeit_kurz Variante_4 movlw B'00000100' ;LED 4 movwf PORTA btfss PORTC, 4 goto Variante_6 goto Variante_7 call zeit_kurz Variante_6 movlw B'01000000' ;LED 5 movwf PORTA btfss PORTC, 4 goto Variante_8 goto Variante_9 call zeit_kurz Variante_8 movlw B'00000100' ;LED 6 movwf PORTA btfss PORTC, 4 goto Variante_10 goto Variante_11 call zeit_kurz Variante_10 movlw B'00000100' ;LED 7 movwf PORTA btfss PORTC, 4 goto Variante_10 goto Variante_11 call zeit_kurz Variante_12 movlw B'00001000' ;LED 8 movwf PORTA btfss PORTC, 4 goto Variante_14 goto Variante_15 call zeit_kurz Variante_14 movlw B'10000000' ;LED 9 movwf PORTB btfss PORTC, 4 goto Variante_16 goto Variante_17 call zeit_kurz goto Schleife Variante_1 movlw B'00001000' ;LED 1 movwf PORTC goto Schleife Variante_3 movlw B'01110111' ;LED 2 movwf PORTC goto Schleife Variante_5 movlw B'01000001' ;LED 3 movwf PORTC goto Schleife Variante_7 movlw B'01100101' ;LED 4 movwf PORTB goto Schleife Variante_9 movlw B'01001001' ;LED 5 movwf PORTC goto Schleife Variante_11 movlw B'01101101' ;LED 6 movwf PORTC goto Schleife Variante_13 movlw B'01101101' ;LED 7 movwf PORTC goto Schleife Variante_15 movlw B'01101101' ;LED 8 movwf PORTC goto Schleife Variante_17 movlw B'01101101' ;LED 8 movwf PORTC goto Schleife zeit_kurz movlw D'1' movwf i Cycle_kurz nop nop nop nop nop nop nop nop nop nop decfsz i,F goto Cycle_kurz return end







Zitieren

Lesezeichen