2417 views|1 replies

14

Posts

1

Resources
The OP
 

Opening: Forever LED Light [Copy link]

The eternalLEDlamp
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.
The specific code is shown in Figure 3:
[attach]412958 [/attach]
Figure 3: LED initialization program
3. See the code below for details.
[attach]412959 [/attach]


GD32.jpg (157.62 KB, downloads: 0)

GD32.jpg

led1.png (33.87 KB, downloads: 0)

led1.png

led2.png (45.11 KB, downloads: 0)

led2.png

led3.png (95.68 KB, downloads: 0)

led3.png

001_LED.rar

358.9 KB, 阅读权限: 5, downloads: 8

This post is from GD32 MCU
 

14

Posts

1

Resources
2
 
Received the development board on the first day
This post is from GD32 MCU
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list