USART question

teddy
 
Avatar
 
Betreff:

USART question

 · 
Gepostet: 05.05.2015 - 14:56 Uhr  ·  #1
Hello,
In a project with a ATmega1284, I use 2 UART's.
On one of them, I only need the reception (rxd).
In this case, do you know if it is possible to use the txd port as I/O ?
Thank you for any suggestions!
Lschreyer
Schreiberling
Avatar
Geschlecht: keine Angabe
Beiträge: 527
Dabei seit: 02 / 2007
Betreff:

Re: USART question

 · 
Gepostet: 06.05.2015 - 09:27 Uhr  ·  #2
I am sure, if you declare the port as output after initialization of the serport driver, it will work.
Merlin
Administrator
Avatar
Geschlecht:
Alter: 25
Beiträge: 1474
Dabei seit: 03 / 2005
Betreff:

Re: USART question

 · 
Gepostet: 06.05.2015 - 11:12 Uhr  ·  #3
You may need to reset the TXEN flag also. Refer to the manual for more details on which register this is in.
teddy
 
Avatar
 
Betreff:

Re: USART question

 · 
Gepostet: 06.05.2015 - 20:37 Uhr  ·  #4
Good news! Thank you for your answers, I will test it soon.
teddy
 
Avatar
 
Betreff:

Re: USART question

 · 
Gepostet: 18.05.2015 - 06:33 Uhr  ·  #5
Zitat geschrieben von Merlin

You may need to reset the TXEN flag also. Refer to the manual for more details on which register this is in.

Indeed, I confirm that it is necessary to TXEN false.
This solution satisfies me, because in my application, all the chip pins were used, and I needed an additional digital input.
Thank you for this solution.
Gewählte Zitate für Mehrfachzitierung:   0

Registrierte in diesem Topic

Aktuell kein registrierter in diesem Bereich

Die Statistik zeigt, wer in den letzten 5 Minuten online war. Erneuerung alle 90 Sekunden.
MySQL Queries: 14 · Cache Hits: 14   92   106 · Page-Gen-Time: 0.030307s · Speichernutzung: 2 MB · GZIP: ein · Viewport: SMXL-HiDPI