User Guide
GD32E230C-EVAL
13 /24
5. Routine use guide
5.1. GPIO_Runing_Led
5.1.1. DEMO Purpose
This Demo includes the following functions of GD32 MCU:
Learn to use GPIO for controlling the LED
Learn to use SysTick to generate 1ms delay
GD32E230C-EVAL board has four LEDs. The LED1, LED2, LED3 and LED4 are
controlled by GPIO. This demo will show how to light the LEDs.
5.1.2. DEMO Running Result
Download the program <01_GPIO_Runing_Led> to the EVAL board, four LEDs will turn
on one by one from LED1 to LED4 every 200ms, and then turn off together. 200ms later,
the four LEDs work like previous again.
5.2. GPIO_KeyBoard_Polling_mode
5.2.1. DEMO Purpose
This Demo includes the following functions of GD32 MCU:
Learn to use GPIO control the LED and the KEY
Learn to use SysTick to generate 1ms delay
GD32E230C-EVAL board has three keys and four LEDs. The three keys are Reset key,
Tamper key and Wakeup key. The LED1, LED2, LED3 and LED4 are controlled by
GPIO.
This demo will show how to use the Tamper key to control the LED2. When press down
the Tamper Key, it will check the input value of the IO port. If the value is 0, wait for 50ms.
Then check the input value of the IO port again. If the value is still 0, indicates that the
button is pressed down successfully, and light the four LED2.
5.2.2. DEMO Running Result
Download the program <02_GPIO_KeyBoard_Polling_mode> to the EVAL board, When
press down the Tamper Key, LED2 will be turned on. Press down the Tamper Key again,
LED2 will be turned off.