Gast
#404199
Error in plugin: Atmel AVR Assembler Command: COMPILE diese fehlermeldung erhalte ich beim debuggen! der aufruf der unterroutine "delay" funktioniert nut, wenn ich nach "rcall delay" etwas stehen habe, z.B. nop wen ich nur einen rjmp befehl danach schreibe, geht es nicht. kann jemand helfen? hier der code ; Ampel steuerung mit ATMega 8 .include "m8def.inc" .def temp = r16 .def uZahl = r17 .def mZahl = r18 .def oZahl = r19 ldi temp, Low(RAMEND) out SPL, temp ldi temp, high(RAMEND) out SPH, temp ;Stack Pointer Intialisieren ldi temp, 0x00 out DDRD, temp ;Byte D ist ausgang ldi temp, 0b00100100 out PORTD, temp ;Alle ampeln Rot ldi oZahl, 0x01 rcall delay nop rjmp loop delay: ldi mZahl, 0xff delay_: ldi uZahl, 201 delay__: dec uZahl brne delay__ dec mZahl brne delay_ dec oZahl brne delay ret loop: ldi temp, 0b00100110 ;Rot - Rot Gelb out PortD, temp ldi oZahl, 1 rcall delay ldi temp, 0b00100001 ;Rot - Grün out PortD, temp ldi oZahl, 5 rcall delay ldi temp, 0b00100010 ;Rot - Gelb out PortD, temp ldi oZahl, 1 rcall delay ldi temp, 0b00100100 ;Rot - Rot out PortD, temp ldi oZahl, 1 rcall delay ldi temp, 0b00110100 ;Rot Gelb - Rot out PortD, temp ldi oZahl, 1 rcall delay ldi temp, 0b00001100 ;Grün - Rot out PortD, temp ldi oZahl, 5 rcall delay ldi temp, 0b00010100 ;Gelb - Rot out PortD, temp ldi oZahl, 1 rcall delay ldi temp, 0b00100100 ;Rot - Rot out PortD, temp ldi oZahl, 1 rcall delay rjmp loop