Testing Board Features
2016 Microchip Technology Inc.
DS50002480A-page 37
3.3.9
UART Communication Tab
There are several combinations of connectivity, which are determined through
jumper J12:
• (Default Setting): MCP2221 (from PC) to PIC16F1509. Every time the
PIC
®
microcontroller receives a character from the MCP2221, it increments its
value and sends it back.
• MCP2221 (from PC) to RS-232 connector.
• PIC16F1509 to RS-232. Unless the PIC microcontroller is reprogrammed, it will
behave the same as in Case 1 described above.
For the first two cases, data loss (sent or received) may be noticed inside the PC
application’s text box due to the nature of the .NET Framework that is used by the
application. A work around is to use a third-party PC application for COM port bridging.
3.3.9.1
TAB OPERATION
To receive information on the COM ports present in the system, follow these steps:
1. Open the
UART
Communication
tab.
2. Click the
Get COM Ports Info
button for the system to display information (in the
text box below it) about the COM ports present in the system; this can be used
to determine the COM port number of the MCP2221 USB to I
2
C/UART converter
from the demonstration board.
3. Select the COM port number from the drop-down box. The system will populate
the “Baud:”, “Data Bits:” and “Stop Bits:” fields. For example, the settings in the
case of communication between MCP2221 and PIC16F1509 (determined
through jumper J12) are: Baud: 9600, Data Bits: 8, Stop Bits: 1.
4. Open the COM port by clicking the
Open Port
button.
5. Received data is automatically added inside the read-only text box on the
right-hand side as red colored text.
To send data, follow these steps:
1. Open the
UART
Communication
tab.
2. Enter the information you want to communicate in the text boxes corresponding
to the
Text 1, Text Line 2
and
Text
Line
3
buttons, under the “Send data:”
section.
3. “Sent data:” can be seen inside the read-only text box on the right-hand side
(combined with the received data) if the “Show Sent Data” check box is selected.
4. The buttons,
Text Line 2
and T
ext Line 3
, place the sent/received data on a new
line inside the text box.
5. To clear the text box, click the
Clear Serial Data Box
button.
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from