USART question

teddy
 
Avatar
 
Subject:

USART question

 · 
Posted: 05.05.2015 - 14:56  ·  #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
Gender: n/a
Posts: 527
Registered: 02 / 2007
Subject:

Re: USART question

 · 
Posted: 06.05.2015 - 09:27  ·  #2
I am sure, if you declare the port as output after initialization of the serport driver, it will work.
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1409
Registered: 03 / 2005
Subject:

Re: USART question

 · 
Posted: 06.05.2015 - 11:12  ·  #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
 
Subject:

Re: USART question

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

Re: USART question

 · 
Posted: 18.05.2015 - 06:33  ·  #5
Quote by 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.
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   92   106 · Page-Gen-Time: 0.022825s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI