You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This program shows how to configure the Universal Synchronous and Asynchronous Receiver and Transmitter (USART) in one wire mode. In this mode the Receive (RX) and Transmit (TX) functions use the same pin and the communication becomes half duplex. All the transmitted characters loop-back to the receive buffer and can be compared to check for bus conflicts.
7
+
The applications sends the string 'Microchip.\r\n' every 500 ms through the pin used for both RX and TX.
8
+
9
+
10
+
## Related Documentation
11
+
More details and code examples on the ATMEGA4809 can be found at the following links:
12
+
-[TB3216-Getting Started with USART](https://ww1.microchip.com/downloads/en/Appnotes/TB3216-Getting-Started-with-USART-90003216B.pdf)
| PC0 | RX/TX - digital input (initial configuration) |
46
+
47
+
Note: The pin PC0 is configured as output when the microcontroller transmits messages, but it is configured as input in all the other cases.
48
+
49
+
## Operation
50
+
1. Connect the board to the PC.
51
+
52
+
2. Open the **atmega4809-getting-started-with-usart-studio.atsln** solution in Microchip Studio.
53
+
54
+
3. Set the **One_Wire_Mode** project as Start Up project. Right click on the project in the **Solution Explorer** tab and click **Set as StartUp Project**.
7. Enable two breakpoints, as presented in the image below, and click Continue.
74
+
75
+
<br><imgsrc="images/breakpoints.png"height="235">
76
+
77
+
## Demo
78
+
79
+
When sending characters, the received one works as an acknowledgement. If the received character is the same with the sent one, the transmission is successfull.
80
+
<br><imgsrc="images/demo1.png"width="500">
81
+
82
+
This image shows the string received in a terminal software.
This project shows how to use the USART peripheral in One-Wire mode, in which both the transmitting and the receiving will be implemented using the same pin.
0 commit comments