You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-18Lines changed: 13 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,14 @@
8
8
9
9
# Receive Control Commands via EUSART Using the PIC18F47Q10 Microcontroller
10
10
11
-
This example shows how to implement a command line interface. This way, the microcontroller can receive
12
-
control commands via the EUSART. In this use case, an LED is controlled using commands sent from the
13
-
MPLAB Data Visualizer..
11
+
This example shows how to implement a command line interface, enabling the microcontroller (MCU) to receive control commands via the Enhanced Universal Synchronous Asynchronous Receiver Transmitter (EUSART). In this use case, an LED is controlled using commands sent from the MPLAB® Data Visualizer.
14
12
15
13
## Related Documentation
16
14
17
15
-[TB3282 – Getting Started With UART Using EUSART on PIC18](https://www.microchip.com/en-us/application-notes/tb3282?utm_source=GitHub&utm_medium=TextLink&utm_campaign=MCU8_PIC18-Q10&utm_content=pic18f47q10-cnano-eusart-commands-bare-github&utm_bu=MCU08)
-[PIC18F47Q10 Data Sheet](https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/DataSheets/PIC18F26-45-46-Q10-Data-Sheet-40001996E.pdf?utm_source=GitHub&utm_medium=TextLink&utm_campaign=MCU8_PIC18-Q10&utm_content=pic18f47q10-cnano-eusart-commands-bare-github&utm_bu=MCU08)
18
+
-[PIC18F47Q10 Data Sheet](https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/DataSheets/PIC18F27-47Q10-Micorcontroller-Data-Sheet-DS40002043.pdf?utm_source=GitHub&utm_medium=TextLink&utm_campaign=MCU8_PIC18-Q10&utm_content=pic18f47q10-cnano-eusart-commands-bare-github&utm_bu=MCU08)
-[PIC18F47Q10 Code Examples on GitHub](https://github.com/orgs/microchip-pic-avr-examples/repositories?q=pic18f47q10&type=all)
23
21
@@ -29,38 +27,35 @@ MPLAB Data Visualizer..
29
27
30
28
## Hardware Used
31
29
32
-
- The [PIC18F47Q10 Curiosity Nano](https://www.microchip.com/en-us/development-tool/DM182029?utm_source=GitHub&utm_medium=TextLink&utm_campaign=MCU8_PIC18-Q10&utm_content=pic18f47q10-cnano-eusart-commands-bare-github&utm_bu=MCU08)Development Board is used as a test platform:
30
+
- The [PIC18F47Q10 Curiosity Nano](https://www.microchip.com/en-us/development-tool/DM182029?utm_source=GitHub&utm_medium=TextLink&utm_campaign=MCU8_PIC18-Q10&utm_content=pic18f47q10-cnano-eusart-commands-bare-github&utm_bu=MCU08)development board is used as a test platform:
33
31
34
32

35
33
36
34
## Setup
37
35
38
-
The [PIC18F47Q10 Curiosity Nano](https://www.microchip.com/en-us/development-tool/DM182029?utm_source=GitHub&utm_medium=TextLink&utm_campaign=MCU8_PIC18-Q10&utm_content=pic18f47q10-cnano-eusart-commands-bare-github&utm_bu=MCU08)Development Board has an onboard debugger that acts as an USART to USB convertor so no further hardware is needed.
36
+
The [PIC18F47Q10 Curiosity Nano](https://www.microchip.com/en-us/development-tool/DM182029?utm_source=GitHub&utm_medium=TextLink&utm_campaign=MCU8_PIC18-Q10&utm_content=pic18f47q10-cnano-eusart-commands-bare-github&utm_bu=MCU08)development board has an on-board debugger that acts as an USART-to-USB convertor so no further hardware is needed.
39
37
40
38
The following configurations must be made for this project:
41
39
42
40
| Pin | Configuration |
43
41
| :----------------- | :------------- |
44
-
| RD0 (EUSART2 - TX) | Digital Output|
45
-
| RD1 (EUSART2 - RX) | Digital Input|
46
-
| RE0 (LED0) | Digital Output|
42
+
| RD0 (EUSART2 - TX) | Digital output|
43
+
| RD1 (EUSART2 - RX) | Digital input|
44
+
| RE0 (LED0) | Digital output|
47
45
48
46
## Demo
49
47
50
-
Run the code and configure the Data Visualizer as described in the Technical Brief document. Type commands to be sent to the board. The two available commands are "ON" and "OFF". Observe the LED on the board as it changes its state
51
-
according to the command sent.
48
+
Run the code and configure the Data Visualizer as described in the referenced technical brief document. Type commands to be sent to the board. The two available commands are "ON" and "OFF". Observe the LED on the board as it changes its state according to the command sent. It is convenient to use the line terminator as command delimiter, so for this use case, EUSART will read full lines and then check if the line contains a valid command.
52
49
53
50

54
51
55
52
## Summary
56
53
57
-
One important usage of the EUSART represents the implementation of a command line interface. This way, the
58
-
microcontroller can receive control commands via EUSART. It is convenient to use the line terminator as command
59
-
delimiter, so for this use case, EUSART will read full lines and then check if the line contains a valid command.
54
+
This demo showcases how EUSART can be used to implement a command line interface, allowing the MCU to receive commands via EUSART.
60
55
61
56
## How to Program the Curiosity Nano board
62
57
63
-
This chapter shows how to use the MPLAB X IDE to program a PIC® device with an `ExampleProject.X`. This can be applied for any other projects.
58
+
This chapter shows how to use the MPLAB X IDE to program a PIC® device with an `ExampleProject.X`. This can be applied to any other projects.
64
59
65
60
1. Connect the board to the computer.
66
61
@@ -74,14 +69,14 @@ This chapter shows how to use the MPLAB X IDE to program a PIC® device with an
74
69
75
70
4. Clean and build the ExampleProject project.
76
71
77
-
Right click on the ExampleProject project and select Clean and Build.
72
+
Right click the ExampleProject project and select Clean and Build.
78
73
79
74

80
75
81
76
5. Select the PIC Curiosity Nano in the Connected Hardware Tool section of the project settings:
82
77
83
-
- Right click on the project and click Properties
84
-
- Click on the arrow under the Connected Hardware Tool
78
+
- Right click the project and click Properties
79
+
- Click the arrow under the Connected Hardware Tool
85
80
- Select the PIC Curiosity Nano, click **Apply** and then click **OK**:
86
81
87
82

0 commit comments