Gast
#90633
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