EasyManua.ls Logo

GigaDevice Semiconductor GD32450Z-EVAL - DAC Output Voltage Value Demo; I2 C EEPROM Operations Demo

Default Icon
53 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
User Guide
GD32450Z-EVAL
26
5.10. DAC_Output_Voltage_Value
5.10.1. DEMO purpose
This demo includes the following functions of GD32 MCU:
Learn to use DAC to output voltage on DAC0 output
5.10.2. DEMO running result
Download the program <10_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. And the signal can be observed through the
oscilloscope.
5.11. I2C_EEPROM
5.11.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.11.2. DEMO running result
Download the program <11_I2C_EEPROM> to the EVAL board and run. Connect serial
cable to COM0, 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 LEDs lights flashing, otherwise the serial port
will output "Err: data read and write aren't matching." and all the LEDs light.
The output information via the serial port is as following.