Gast
#13448
Hallo nochmal. Kann mir irgendwer ein mini-UART-test Programm für den AT90S2313 schreiben oder weiss wer wo es so eins gibt dass wirklich und sicher auf einem AT90S2313 funktioniert?! (@Andreas: war nicht im UART Tutorial einmal was für den 2313?!). Es braucht nur 'Test' in einer Endlosschleife gesendet werden, mit Standardeinstellungen (9600baud, kein flow control etc). ich habs mit dem code probiert aba da kommt nur schrott am am PC raus. Ich hoffe also es hat nix mit der Hardware zu tun sondern mit dem Test Programm (ist das aus dem UART Tutorial nur abgeändert) .include "2313def.inc" ;bzw. 2333def.inc .def temp = r16 ldi temp, RAMEND out SPL, temp sbi $0a,TXEN ;TX aktivieren ldi temp,4000000/(9600*16)-1 ;Baudrate 9600 einstellen out $09,temp loop: ldi temp, 'T' rcall serout ;Unterprogramm aufrufen ldi temp, 'e' rcall serout ;Unterprogramm aufrufen ldi temp, 's' rcall serout ;Unterprogramm aufrufen ldi temp, 't' rcall serout ;Unterprogramm aufrufen ldi temp, '!' rcall serout ldi temp, 10 rcall serout ldi temp, 13 rcall serout rjmp loop serout: sbis $0b,UDRE rjmp serout out $0c, temp ret