[vc_row][vc_column width=”1/1″][vc_column_text]There are many serial devices, like Camera, LCD, WiFi module or Bluetooth, using UART communication protocols. It is easy to let pcDuin8 Uno talk with other serial device and this tutorial will tell you how to communicate with serial devices via UART on pcDuino8 Uno.
To make it simple, I take a USB serial cable as an example.[/vc_column_text][vc_tour][vc_tab title=”Prerequisites” tab_id=”1450149165-1-68″][vc_column_text]Hardware
- pcDuino8 Uno
- USB Serial cable
[/vc_column_text][/vc_tab][vc_tab title=”Steps” tab_id=”1450149165-2-73″][vc_column_text]
1. Connect
Make sure you understand the functions of each pin. As to this USB Serial cable, functions are described as follows.
color | description |
red | VCC |
black | GND |
green | TXD |
white | RXD |
Connect PC and pcDuino8 uno with USB Serial cable.
- White line <—> UART-RXD
- Green line <—> UART-TXD
2. Install driver(On Windows PC)
Download the driver and install it.
Plug the USB Serial cable into PC and open Device manager to check which COM port number has been recognized by system.
Open putty or other serial software, set the COM number as 12(depend on your system) and the baudrate is 115200. Then clickOpen button.
3. Run (On pcDuino8 Uno)
Open Arduino IDE and select serial_test project. Then click to compile and execute the program.
This project is used to read UART data from PC, then print ASCII number out. If you enter an ASCII character on serial terminal, you will get a corresponding ASCII number back.
4. Test (On Windows PC)
Enter characters using keyboard on putty window, you will get the ASCII number seemly like: “I received: 49 “.
[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]
Leave a Reply
You must be logged in to post a comment.