Welcome to MSPM0 Smart Robot Car repository
9.RGB light drive
RGB Light Drive
RGB Light Drive1. Software and Hardware2. Basic Principles2.1 Hardware Schematic2.2 Physical Connection Diagram2.3 Control Principle3. Project Configuration3.1 Description3.2 Pin Configuration4. Main Functions4.1 User Functions5. Experimental Phenomenon
This tutorial demonstrates: controlling the onboard RGB through buttons.
1. Software and Hardware
KEIL
MSPM0G3507 Development Board
Type-C data cable or DAP-Link
For programming download or simulation to the development board
2. Basic Principles
2.1 Hardware Schematic
.png)
2.2 Physical Connection Diagram
.png)
2.3 Control Principle
| (Schematic Name) | Control Pin | Specific Meaning |
|---|---|---|
| RGB | PB10 | Control data signal input pin |
Chip Model: WS2812
Communication Protocol:
XGB-2812 is a single-wire transmission three-channel LED drive control chip that uses unipolar return-to-zero code data protocol. Each symbol must have a low level. Each symbol of this protocol starts with a high level, and the high-level time width determines "0" code or "1".

| Symbol | Parameter | Min Value | Typical Value | Max Value | Unit |
|---|---|---|---|---|---|
| T | Symbol period | 1200 | - | - | ns |
| T0H | 0 code, high level time | 200 | 300 | 400 | ns |