Hallo,
I have a problem with RS-232 communication between my microcontroller
ATS902313 and a display. The LCD has RS232 connectors with theses
pins:
1 VDD
2 TxD
3 RxD
4 DTR
5 GND
6 DSR
7 CTS
8 RTS
9 NC
1 and 9 no connected
6 and 4 connected together
8 and 7 connected together
Betweens microcontroller and the LCD I put a Max202. T2out is connected
to pin 3 of the LCD. Txd of microcontroller is connected to t2in.
This is my program; d0 must be show on the LCD
outi UBRR, _UBRR
UART: sbi UCR,TXEN ;activate
ldi w, d0
sbis USR,UDRE ; wait for UART Date Register Empty
rjmp PC-1 ; loop back if not empty
out UDR,w ; output character to UART Data Register
WAIT_US 200
sbis USR,TXC
rjmp PC-1
sbis USR,UDRE
rjmp PC-1
cbi CR,TXEN ;desactivate
WAIT_MS 200
WAIT_MS 100
After power on the microcontroller the LCd displays the right character
but only one time and then there are others characters, and I'dont
know from where they come.
If I connect the PC to LCD with cable it wors perfect
Whats the problem?
Thanks
Andrea
Hello Andrea, have you connected the uC to the PC ? Use a terminal programm to have a look at what it is sending via RS232. If it is what you expected you should have a closer look to the timing, a common display problem. Greets Martin
I try to connect my interface to PC and look with terminal. the result is the same. I think the max is making something wrong. Some one has new idea
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.