Communicating with PIC 32 via Terminal
Now using terminal application like Tera Term we will first send characters to the PIC32MX470F512L microcontroller. Upon receiving the character, the microcontroller will send the same character back.
Note: see tutorial Arduino Bluetooth Module HC-05 Tutorial where we have also used Tera Terminal
Download and open terminal program like Tera Term. When you open you will see the following tera term application window which lets you choose either TCP/IP connection or a serial communication. Select serial communication with the COM port of your USB to TTL converter.
Note that if your USB to TTL converter(also called USB to UART converter) is new and it is first time you are using, you have to go the device manager select the device in the Ports(COM & LPT) list, right click it and install its driver. Then you will be able to use the converter. Otherwise you won’t be able use the Serial communication in the above figure.
Once you open the terminal with serial communication setting as mentioned above, you should see a black screen where at the top it is written
*** UART Interrupt-driven Application Example ***
*** Type some characters and observe the LED turn ON ***
Note that this message is displayed only initially. So if you disconnected tera term and reconnected it then you won’t see the message anymore but the character send and receive will still work. If you wanted to see the messages then you need to reset the microcontroller. Easy way is to connect the _MCLR pin to ground.
Now type any character and you will see the same character gets displayed.
If there was no communication then whatever you type the terminal won’t show anything. It is because there is communication between the computer and PIC32 microcontroller via USB to USART you can see the character that you typed in.
Note that the baud rate for this communication is 9600kbps and there is no parity but one stop bit. If you are confused about the serial communication setting then just go to Setup the selecial Serial port…
Then in the following window, configure the baud rate etc.