ошибка proteus: неверный код операции 0xFFFF на ПК =0x068C
Это мой код:
START:
LDI R18, 0XFF
OUT DDRB, R18 //LET PORT B AS OUTPUT
LDI R16, 0B01110101
OUT TCCR0A, R16
LDI R17, 0B01110101
OUT TCCR0B, R17
LDI R24, 0XFF
OUT DDRD, R24 // LET PORT AS INPUT
OUT OCR0A, R18
MAIN:
IN R18, PINB //LOAD PORT B TO R18
CPI R18, 0B00000000 //CHECK IF R18 == 0
BREQ SPEED1 // JUMP TO SPEED1 IF R18 == 0
OUT OCR0A, R16
OUT OCR0B, R17
IN R18, PINB //LOAD PORTB TO R18
CPI R18, 0B00000001 //CHECK IF R18 == 1
BREQ SPEED2 // JUMP TO SPEED2 IF R18 == 1
OUT OCR0A, R16
OUT OCR0B, R17
IN R18, PINB //LOAD PORTB TO R18
CPI R18, 0B00000010 //CHECK IF R18 == 2
BREQ SPEED3 // JUMP TO SPEED3 IF R18 == 2
OUT OCR0A, R16
OUT OCR0B, R17
IN R18, PINB //LOAD PORTB TO R18
CPI R18, 0B00000011 //CHECK IF R18 == 1
BREQ SPEED4 // JUMP TO SPEED4 IF R18 == 3
OUT OCR0A, R16
OUT OCR0B, R17
RJMP MAIN
SPEED1:
LDI R16, 0B00000001
OUT PORTD, R16
LDI R17, 255
RET
SPEED2:
LDI R16, 0B00000001
OUT PORTD, R16
LDI R17, 180
RET
SPEED3:
LDI R16, 0B00000001
OUT PORTD, R16
LDI R17, 100
RET
SPEED4:
LDI R16, 0B00000001
OUT PORTD, R16
LDI R17, 0
RET
Это мой Протей:
И КОГДА Я БЕГУ, ЭТА ОШИБКА ПРОИЗОШЛА:
Invalid opcode 0xFFFF at PC=0x8C02
Я понятия не имею, что там произошло. любая помощь будет оценена.