Share | Tweet |
---|
In this project we will interface UART with Raspberry pi using a C program. If you are new to UART protocol go through UART protocol theory of operation article before executing this project.
Subscribe here to enable complete access to all technical articles, online tests and projects and earn certificates from online courses.
Complete this project and update here to consider it for online course requirements and earn certificate.
Along with your Raspberry Pi, you will need the following components for this project:
UART in Raspberry pi is used for Linux console output and Bluetooth purpose. Hence we need to enable the UART first before we try to communicate using UART. To configure UART open a terminal console and enter command "sudo raspi-config" and select option 5 Interfacing Options and then click on Finish as shown on the following picture.
After selecting Interfacing option enable UART by selecting the Serial option as shown below.
To confirm login shell to be accessible over serial select following option as NO.
Give option as yes when asked to enable serial hardware as shown in following figure.
Raspberry Pi 3 board has pin 8(GPIO14) and pin 10(GPIO15) used as UART Tx and UART Rx respectively. Following picture shows the pins we will be using in this project.
Make sure that PI is NOT powered on. You should connect the pin 6(GND) to the GND pin, pin 8(UART0 TX) to the GND pin of TTL to USB converter module. Connect other end of the TTL to USB converter module to one of the USB port port in your computer. Go to windows start -> device manager and check that the converter module is recongnized. If it is not recognized, right click on the device and follow the direction to get the driver for the module from internet. Once all the three connections are made between Raspberry pi and TTL - USB converter module, you power on the pi and develop the uart program as explained in the next section.
The schematic diagram for this project is shown in the following picture.
Subscribe below to unlock project and earn certificates for software jobs
SubscribeShare | Tweet |
---|
Linux software development |
C programming & applications |
Embedded systems development |
Linux OS Internals |
Linux OS Commands |
Linux Processes and Threads |
Linux IPC Mechanisms |
Git Version Control |
Series completion |
LCM and HCF of numbers |
Time and Distance |