Skip to content

Commit f015321

Browse files
committed
MPAE-19376 - editorial udpates to README.MD, updates to meta data file, renaming some images
1 parent 64cbbf4 commit f015321

File tree

8 files changed

+89
-80
lines changed

8 files changed

+89
-80
lines changed

.main-meta/main.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
}
3838
},
3939
"author": "Sok Yan Poon",
40-
"peripherals": [],
40+
"peripherals": ["GPIO"],
4141
"keywords": ["Melody","RGB","WS2812"],
4242
"additionalData": {
4343
"longDescription": {

.main-meta/main.json.bak

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"metaDataVersion": "1.0.0",
3+
"category": "com.microchip.ide.project",
4+
"content": {
5+
"metaDataVersion": "1.3.0",
6+
"name": "com.microchip.mcu8.mplabx.project.pic18f56q24-curiosity-nano-explorer-ws2812",
7+
"version": "1.0.0",
8+
"displayName": "Curiosity Nano Explorer WS2812",
9+
"projectName": "pic18f56q24-curiosity-nano-explorer-ws2812",
10+
"shortDescription": "This example will demonstrate how to interface with the individually addressable WS2812 LEDs on the Curiosity Explorer Development board using Core Independent Peripherals and MCC.",
11+
"ide": {
12+
"name": "MPLAB X",
13+
"semverRange": ">=6.20.0"
14+
},
15+
"compiler": [
16+
{
17+
"name": "XC8",
18+
"semverRange": "^3.0.0"
19+
}
20+
],
21+
"dfp": {
22+
"name": "PIC18F-Q_DFP",
23+
"semverRange": "^1.27.449"
24+
},
25+
"configurator": {
26+
"name": "MCC",
27+
"semverRange": ">=5.5.1"
28+
},
29+
"device": {
30+
"metaDataVersion": "1.0.0",
31+
"category": "com.microchip.portal.contentRef",
32+
"content": {
33+
"metaDataVersion": "1.0.0",
34+
"category": "com.microchip.device",
35+
"name": "PIC18F56Q24",
36+
"versionRange": "*"
37+
}
38+
},
39+
"author": "Sok Yan Poon",
40+
"peripherals": [],
41+
"keywords": ["Melody","RGB","WS2812"],
42+
"additionalData": {
43+
"longDescription": {
44+
"metaDataVersion": "1.0.0",
45+
"category": "com.microchip.portal.fileRef",
46+
"content": {
47+
"metaDataVersion": "1.0.0",
48+
"fileName": "./README.md",
49+
"mimeType": "text/markdown"
50+
}
51+
}
52+
}
53+
}
54+
}

README.md

Lines changed: 34 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
</picture>
99
</a>
1010

11-
# PIC18F54Q24 curiosity nano explorer WS2812 RGB LED
11+
# Interfacing WS2812 RGB LEDs on the Curiosity Explorer board using the PIC18F56Q24
1212

13-
This example demonstrates the setup of the WS2812B on the Curiosity Nano Explorer Board using the PIC18F56Q24 MCU. The WS2812B is a RGB LED that integrates a control circuit and RGB chip in a package. It allows for easy control of multiple LEDs with a single data line, making it ideal for creating colorful lighting effects and displays.
13+
This example demonstrates how to interface the WS2812B RGB LEDs on the Curiosity Nano Explorer Board using the PIC18F56Q24 Curiosity Nano. The WS2812B is an RGB LED that integrates both a control circuit and an RGB chip into a single package. It allows for easy control of multiple LEDs with a single data line, making it ideal for creating colorful lighting effects and displays.
1414

15-
In this project, we will configure the PIC18F56Q24 MCU to communicate with the WS2812B LEDs and create various lighting patterns. The setup includes initializing the necessary peripherals, configuring the data output pin, and writing the code to send the correct timing signals to control the LEDs.
15+
In this project, the PIC18F56Q24 is configured to communicate with the WS2812B LEDs and generate various lighting patterns. The setup includes initializing the necessary peripherals, configuring the data output pin, and writing code to send the precise timing signals required to control the LEDs.
1616

1717
## Related Documentation
1818

19-
- [WS2812B Datasheet](https://www.mouser.com/pdfDocs/WS2812B-2020_V10_EN_181106150240761.pdf?srsltid=AfmBOopdvP0PGu8i-pUqTUgdWq0Vi2g59cHWBBg5ldpRW6VLxrdR9cZ1)
19+
- [WS2812B Datasheet](https://www.mouser.com/pdfDocs/WS2812B-2020_V10_EN_181106150240761.pdf?srsltid=AfmBOopdvP0PGu8i-pUqTUgdWq0Vi2g59cHWBBg5ldpRW6VLxrdR9cZ1)
2020
- [PIC18F56Q24 Curiosity Nano User Guide](https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/UserGuides/PIC18F56Q24-CNANO-UserGuide-DS50003618.pdf)
2121
- [Curiosity Nano Explorer User Guide](https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/UserGuides/CNANO-Explorer-UserGuide-DS50003716.pdf)
2222

@@ -30,106 +30,61 @@ In this project, we will configure the PIC18F56Q24 MCU to communicate with the W
3030

3131
## Hardware Used
3232

33-
- [PIC18F56Q24 CURIOSITY NANO EVALUATION KIT ](https://www.microchip.com/en-us/development-tool/ev01e86a)
34-
35-
<p align="center">
36-
<img src="images/pic18f56q24.png" alt="pic18f56q24">
37-
<br>
38-
<em id="figure-1">Figure 1: PIC18F56Q24 CURIOSITY NANO EVALUATION KIT</em>
39-
</p>
40-
41-
- [Curiosity Nano Explorer ](https://www.microchip.com/en-us/development-tool/ev58g97a)
42-
43-
<p align="center">
44-
<img src="images/curiositynanoexplorer.png" alt="Curiosity Nano Explorer">
45-
<br>
46-
<em id="figure-2">Figure 2: Curiosity Nano Explorer</em>
47-
</p>
48-
33+
- [PIC18F56Q24 Curiosity Nano Evaluation Kit ](https://www.microchip.com/en-us/development-tool/ev01e86a)
34+
- [Curiosity Nano Explorer](https://www.microchip.com/en-us/development-tool/ev58g97a)
4935
- USB type C cable
5036

37+
![Curiosity Nano Explorer](images/curiositynanoexplorer.png)
38+
5139
## Setup
52-
Block Diagram below shows how to connection and of MCU and WS2812B.
40+
The block diagram below shows how to connect the PIC18F56Q24 Curiosity Nano to the WS2812B LEDs on the Curiosity Explorer Board.
5341

54-
<p align="center">
55-
<img src="images/MCU project.png" alt="Block Diagram">
56-
<br>
57-
<em id = "figure-3">Figure 3: Block Diagram</em>
58-
</p>
59-
</p>
42+
![Block Diagram](images/block_diagram.png)<br>
6043

61-
Follow the steps below to set up and run the example:
44+
### Follow the steps below to set up and run the example:
6245

63-
1. Connect the PIC18F56Q24 MCU to the Curiosity Nano Explorer board.
46+
1. Connect the PIC18F56Q24 MCU to the Curiosity Nano Explorer Board.
6447
2. Connect the PIC18F56Q24 MCU to your computer using a USB cable.
65-
3. Make sure the pin WS2812B-RGB is connected to the data line of the WS2812B in the Curiosity Nano Explorer board.
66-
4. Create a new project in MPLAB® X IDE and open MCC. If first time using MCC, follow this [Getting Started with MCU Projects Using MPLAB® Code Configurator (MCC) Melody - Developer Help](https://developerhelp.microchip.com/xwiki/bin/view/software-tools/frameworks/mcc-melody/getting-started/)
67-
5. Configure the output pin for the WS2812B LEDs, as shown in [Figure 7](#figure-7).
48+
3. Ensure that the WS2812B-RGB pin is connected to the data line of the WS2812B on the Curiosity Nano Explorer Board.
49+
4. Create a new project in MPLAB® X IDE and open MCC. If this is your first time using MCC, refer to [Getting Started with MCU Projects Using MPLAB® Code Configurator (MCC) Melody - Developer Help](https://developerhelp.microchip.com/xwiki/bin/view/software-tools/frameworks/mcc-melody/getting-started/)
50+
5. Configure the output pin for the WS2812B LEDs, as shown in Figure 7.
6851
6. Write the code to generate the correct timing signals for the WS2812B LEDs.
6952
7. Compile and program the code into the PIC18F56Q24 MCU.
70-
8. Observe the lighting patterns and effects created by the LEDs.
71-
72-
### Pin Setup
73-
The [User Guide](https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/UserGuides/CNANO-Explorer-UserGuide-DS50003716.pdf) for the Curiosity Explorer Nano board provides the pin mappings.
53+
8. Observe the lighting patterns and effects produced by the LEDs.
7454

75-
<p align="center">
76-
<img src="images/ExplorerWS2812.png" alt="ExplorerWS2812">
77-
<br>
78-
<em id = "figure-4">Figure 4: Explorer WS2812B Pin Mappings</em>
79-
</p>
80-
</p>
55+
## Pin Configuration
56+
The [userguide](https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/UserGuides/CNANO-Explorer-UserGuide-DS50003716.pdf) for the Curiosity Explorer Nano board provides detailed information about the pin mapping between the Curiosity Explorer board and the PIC18F56Q24 Curiosity Nano board being used in this example.
8157

82-
As shown in [Figure 4](#figure-4) above, pin IO 27 of the Curiosity Explorer Nano board is connected to the data line of the WS2812B LEDs.
58+
As shown in [Figure 4](#figure-4) of the user guide above, pin IO27 on the Curiosity Nano Explorer Board is connected to the data line of the WS2812B LEDs.
8359

84-
<p align="center">
85-
<img src="images/PIC18F56Q24_CuriosityNano.png" alt="CNANO_PINS">
86-
<br>
87-
<em id="figure-5">Figure 5: PIC18F56Q26 Pin Mappings</em>
88-
</p>
89-
</p>
60+
![Curiosity Explorer Board Pin Mapping](images/ExplorerWS2812.png)<br>
9061

91-
Pin mapping for PIC18F56Q24 can be find in [PIC18F56Q24 User Guide](https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/UserGuides/PIC18F56Q24-CNANO-UserGuide-DS50003618.pdf#page=6)
62+
The pin mapping for the PIC18F56Q24 Curiosity Nano Board can be found in the [PIC18F56Q24 User Guide](https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/UserGuides/PIC18F56Q24-CNANO-UserGuide-DS50003618.pdf#page=6). Based on [Figure 5](#figure-5) and [Figure 6](#figure-6), pin IO27 on the Curiosity Nano Explorer Board is connected to the data line of the WS2812B LEDs. Ensure that the jumper is in place to connect the **WS2812B-RGB** pins on the Curiosity Nano Explorer Board. In this example project, the data line is connected to pin RE0 of the PIC18F56Q24 MCU. This pin must be configured as an output in MCC.
9263

93-
Based on [Figure 5](#figure-5) and [Figure 6](#figure-6), the pin IO 27 of the Curiosity Explorer Nano board is connected to the data line of the WS2812B LEDs. Ensure that the jumper is connected to link the pins **WS2812B-RGB** on the Curiosity Explorer Nano Board.
64+
![WS2812 RGP Jumper](images/WS2812B_RGB_Pin.png)<br>
9465

95-
The pin in this example project is connected to pin RE0 of the PIC18F56Q24 MCU. This pin is required to be configured as an output pin in MCC.
66+
![Curiosity Nano Connections to Explorer](images/PIC18F56Q24_CuriosityNano.png)<br>
9667

97-
<p align="center">
98-
<img src="images/CuriosityNanoExplorerPinouts.png" alt="CNANO_PINS">
99-
<br>
100-
<em id="figure-6">Figure 6: Curiosity Nano Explorer Pinouts</em>
101-
</p>
102-
</p>
68+
The pinout for the Curiosity Nano Socket located on the Curiosity Nano Explorer Board that is shown below can also be found in the [userguide](https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/UserGuides/CNANO-Explorer-UserGuide-DS50003716.pdf).
10369

104-
Pinout for CNANO Socket can be find in the [Curiosity Nano Explorer User Guide](https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/UserGuides/CNANO-Explorer-UserGuide-DS50003716.pdf#page=9)
70+
![Curiosity Nano Pinout](images/CuriosityNanoExplorerPinouts.png)<br>
10571

106-
In MCC, select RE0 as output pin as shown in the [Figure 7](#figure-7) below. RE0 is renamed to be RGB in the Pin configuration window as shown in [Figure 8](#figure-8) below.
72+
### MCC Configuration for Pin Setup
10773

108-
<p align="center">
109-
<img src="images/PinGrid_View.png" alt="PinGridView">
110-
<br>
111-
<em id="figure-7">Figure 7: Pin Grid View for LED Output</em>
112-
</p>
113-
</p>
74+
In MCC, select RE0 as the output pin, as shown in [Figure 7](#figure-7) below. In the Pin Configuration window, RE0 is renamed to RGB, as illustrated below. All other MCC configurations remain at their default settings, as only one output pin needs to be added in this example. The next step after configuring the pin settings in MCC is to write the firmware to send the timing signals required to drive the WS2812B LEDs.
11475

115-
<p align="center">
116-
<img src="images/Pin Name.png" alt="Pin Name">
117-
<br>
118-
<em id="figure-8">Figure 8: Pin Name for LED Output</em>
119-
</p>
120-
</p>
76+
![MCC Pin Grid View](images/PinGrid_View.png)<br>
12177

122-
MCC setup remain default, only adding 1 output pin for this example, the next step is to write the code to send the timing signals required by the WS2812B LEDs.
78+
![MCC Pin Renaming](images/pin_name.png)<br>
12379

12480
### Code setup
125-
For complete application code and comprehensive description of the implementation, please refer to [main.c](\RGB_WS2812B.X\main.c) for the complete code.
81+
For the complete application code and a comprehensive description of the implementation, please refer to [main.c](\RGB_WS2812B.X\main.c).
12682

12783
## Operation
128-
After programmed the device, the lighting patterns and effects created by the WS2812B LEDs should be obsereved. If not, ensure that:
84+
After programming the device, the lighting patterns and effects created by the WS2812B LEDs should be observed. If the LEDs do not function as expected, ensure that:
12985

130-
The output pin is correctly configured and connected to the data line of the WS2812B LEDs.
131-
The code is correctly generating the timing signals required by the WS2812B LEDs.
86+
- The output pin is correctly configured and connected to the data line of the WS2812B LEDs.
87+
- The code is correctly generating the timing signals required by the WS2812B LEDs.
13288

13389
## Summary
134-
This document provides a guide for setting up and running an example project that demonstrates the control of WS2812B RGB LEDs using the PIC18F56Q24 MCU on the Curiosity Nano Explorer Board. It includes steps for hardware setup, software configuration, and code implementation. The document also provides links to related documentation, lists the required software and hardware, and describes the features and prerequisites for the project. Detailed instructions are given for configuring the output pin and writing the code to control the LEDs. Finally, it offers guidelines for verifying the correct operation of the project and troubleshooting any issues.
135-
90+
This document provides a guide for setting up and running an example project that demonstrates how to control WS2812B RGB LEDs using the PIC18F56Q24 MCU on the Curiosity Nano Explorer Board. It covers hardware setup, software configuration, and code implementation. The document includes links to related documentation, lists the required software and hardware, and outlines the features and prerequisites for the project. Step-by-step instructions are provided for configuring the output pin and writing the code to control the LEDs. Additionally, the document offers guidelines for verifying correct operation and troubleshooting any issues that may arise.
File renamed without changes.
File renamed without changes.

images/curiositynanoexplorer.png

894 KB
Loading

images/pic18f56q24.png

-199 KB
Binary file not shown.
File renamed without changes.

0 commit comments

Comments
 (0)