Today I finally received the GD32E231C8T6development board from GigaDevice. First, let's talk about the eternal topic of lighting. Let's take a nice photo of this development board! Figure1is this little guy. Figure 1: Start Development Board Photo 1. Hardware circuit This development board is called Start, and its LED circuit is shown in Figure 2. The IO ports used by the LED are shown in Table 1. Figure 2: LED circuit Table 1: IO ports used by LED lamps 412957 From the LED circuit diagram, we can know that all LED lamps use GPIO A, and a high level lights up the LED lamp. Therefore, we only need to configure these IO ports as output mode and give the corresponding IO port a high level to light up the corresponding LED lamp.
2. Software part
First, for PA7, PA8, PA11, and PA12, we now configure them into output mode as follows:
a. Enable the clock of GPIOA;
b. Set PA7, PA8, PA11, and PA12 in GPIOA to output mode;
c. PA7, PA8, PA11, and PA12 in GPIOA output high and low levels to light up the corresponding LED lights.