RS232 LCD

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
Gast #90634
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
Gast #90635
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

Antwort schreiben

Eine eigene Frage? Dieser Thread ist über 22 Jahre alt. Stell sie in einem eigenen Thread – dort lesen mehr Leute mit, und sie wird öfter und schneller beantwortet.

Neuen Thread starten

Eine Lösung, Ergänzung oder Rückmeldung zu diesem Thread? Dann antworte hier.

Formatierung
  • [c]C-Code[/c]
  • [code]Code in anderen Sprachen, ASCII-Zeichnungen[/code]
  • [math]Formel in LaTeX-Syntax[/math]
  • [[Titel]] – Link zu einem Artikel
  • Verweis auf einen anderen Beitrag: Rechtsklick auf dessen Beitrags-ID (#8078628), „Adresse kopieren“, in den Text einfügen

Mehr zur Formatierung

Längeren Sourcecode als Anhang, nicht in den Text. JPG nur für Fotos und Scans; Zeichnungen und Screenshots als PNG oder GIF. Siehe Bildformate.

Schon registriert? Anmelden

Wird nicht angezeigt. Wir schicken dir einen Link; sobald du damit bestätigst, erscheint dein Beitrag.

Mit dem Abschicken legst du einen kostenlosen Account an und erkennst die Nutzungsbedingungen und die Datenschutzerklärung an.