Serial Communication with Microcontroller-2

By IKTech May 29, 2017

In the previous episode we have seen how to simulate serial communication with microcontrollers. And in this phase, the microcontroller’s connection to the computer is to be done, in reality.

What it needs to do is to provide computer connections with the DB9 connector from the previous circuit’s circuit diagram. First, find out the 9-pin serial port behind the computer’s CPU. What have you found?


It does not seem to be found, because now CPU does not have a 9-pin serial port. Then the way? One way is to use the computer’s US port. Then there will be something that will convert it into the series with input from the USB. This is called the USBT-serial converter. It has one head on the head of the USB 9 pin serial connector, which can be easily inserted into our circuit DB9 connector. It looks like the picture below,

Now let’s come to the whole point of connection, the concept of connection is very low,

We have all the left DB9 connectors of our circuits. It will connect with our serial port of USB-to-Serial Converter. The remaining USB port will connect with the computer. Better to say, separate driver for USB-to-serial converter is installed, it is available on the CD while buying converter. After installing the driver, after installing the Converter computer, it will be installed on the Windows operating system found New Hardware … and it will be named COMXX (Any number instead of XX).

Now it’s time to connect to the computer. Open MikroC and go to Tools> UART Terminal. Then there will come a window like this,

On the left side of this window, select Com Port, in the select box, select the COM port that contains the USB-2-serial converter. The remaining options of COM Port Settings should be kept in default values, as we have configured the microcontroller in Episode 1. Everything will be ok to click on Commands’ Connect. The diameter, the computer connection with the microcontroller, the congratulation, Eid-Mobarak !!

This is the turn of the Communication. We will use the command table found in Part 1. To send the command to the microcontroller, the data will be entered in the text area on the right side of Send. And for this project, Append New Line has to be checked. By pressing the command and pressing the send button, the data will be left in the microcontroller. There is also more, the receiver section below to receive data from the microcontroller. There will be data from the microcontroller. Then type commands from Part 1 of the command table and write it down and see the fun of serial communication.

Leave a Reply

Your email address will not be published.