Ich hab das ganze jetzt so gelöst, vielleicht mach ich das später noch mal schön, und schau mir das mit dem 1/7/1 mit Parity einstellungen an.
Code:
check_Parity:
mov temp2, empfangen
andi temp2, 0b10000000
rol temp2
rol temp2
ldi temp, 0b00000000
rol empfangen ;bit 7 in Carry
rol empfangen ;bit 6 in Carry
brcs Check_Parity_1_plus
rol empfangen ;bit 5 in Carry
brcs Check_Parity_1_plus
rol empfangen ;bit 4 in Carry
brcs Check_Parity_1_plus
rol empfangen ;bit 3 in Carry
brcs Check_Parity_1_plus
rol empfangen ;bit 2 in Carry
brcs Check_Parity_1_plus
rol empfangen ;bit 1 in Carry
brcs Check_Parity_1_plus
rol empfangen ;bit 0 in Carry
brcs Check_Parity_1_plus
rol empfangen ;bit Carry in Carry (Ausgangszustand)
andi temp, 0b00000001
cp temp, temp2
brne PC+4
mov temp, empfangen
andi temp, 0b01110001
ret
ldi Senden, 0b01000011
call RT868F5_senden
ldi temp, 0b00000000
ret
Check_Parity_1_plus:
inc temp
ret
war glaub ich eine super idee mit dem verschieben aufs carry. Danke für die schnelle Hilfe
Lesezeichen