Gast
#61104
Hallo.
Wieder mal ne neue Frage, die mich zur Verzweiflung treibt g.
Wie kann man mit einem 2051 mit 8 datenbits, start-und stoppbit und
ungerader paritaet senden? Dass das mit dem StandardUART nicht mehr
moeglich ist, ist mir klar. Ich hab bereits einen Software-uart, weiss
jetzt aber nicht, wie ich das Paritaetsbit da einsetzen soll. Habe es
mehrmals versucht, ohne Oszi scheint das aber absolut nicht zu wollen:
out_OUT EQU 3.1
jmp start
; 9600 @ 22.1184Mhz
out_out:
push 0
push Acc
mov R0,#8
clr out_OUT
call out_L3
call out_L3
out_L2:
rrc a
mov out_OUT,c
call out_L3
call out_L3
djnz R0,out_L2
setb out_OUT
call out_L3
call out_L3
pop Acc
pop 0
ret
out_L3:
push psw
push 0
mov 0,#40
out_L3_labelA:
djnz 0,out_L3_labelA
pop 0
pop psw
ret
start:
setb out_OUT
mov SP, #20h
main:
mov a, #88h
call out_out
jmp main
end
Hat vielleicht jemand nen Vorschlag? oder evtl sogar eine bessere
Routine? :)
mfg andré