User Guide
GD32E507Z-EVAL
23/43
5.11.2. DEMO running result
Download the program <11_DAC_Output_Voltage_Value> to the EVAL board and run, all the
LEDs will turn on and turn off for test. The digital value is 0x7FF0, its converted analog voltage
should be 1.65V (VREF/2), using the voltmeter to measure PA4 or DAC_OUT0 on JP5, its
value is 1.65V.
5.12. I2C_EEPROM
5.12.1. DEMO purpose
This demo includes the following functions of GD32 MCU:
Learn to use the master transmitting mode of I2C module
Learn to use the master receiving mode of I2C module
Learn to read and write the EEPROM with I2C interface
5.12.2. DEMO running result
Download the program <12_I2C_EEPROM> to the EVAL board and run. Connect serial cable
to USART0, jump JP13 to USART, then open the HyperTerminal to show the print message.
Firstly, the data of 256 bytes will be written to the EEPROM from the address 0x00 and printed
by the serial port. Then, reading the EEPROM from address 0x00 for 256 bytes and the result
will be printed. Finally, compare the data that were written to the EEPROM and the data that
were read from the EEPROM. If they are the same, the serial port will output "I2C-AT24C02
test passed!" and the four LEDs lights flashing, otherwise the serial port will output "Err:data
read and write aren't matching." and all the four LEDs light.
The output information via the serial port is as following.