Software Development
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. **
35
4.2.1 AD Converter
4.2.1.1 Project Description
This project demonstrates the Analog-to-Digital conversion of the S6E2HG device. This example
sets the ADC channel 18 in single conversion mode with interrupt enabled. ADC channel 18 is
connected to a potentiometer. The conversion is started using a software trigger. When ADC
conversion is completed, the interrupt callback function is called, it reads the result data and
prints it to UART0.
4.2.1.2 Hardware Connection
No specific hardware connections are required for this project. All connections are hardwired on
the board.
4.2.1.3 Verify Output
1. Power the FM4 S6E2HG-Series Starter board from CN3 using a USB cable, refer to
2. Open the project file in IAR Embedded Workbench or Keil µVision IDE from the following
directory on your PC:
IAR project: <User_Directory>:
\FM4 S6E2H-Series Starter Kit_Ver01\Firmware
\Demo Projects\s6e2hg_adc\IAR\s6e2hg_adc.eww.
Keil project: <User_Directory>:
\FM4 S6E2H-Series Starter Kit_Ver01\Firmware
\Demo Projects\s6e2hg_adc\ARM\s6e2hg_adc.uvprojx.
3. Build the project and download the code into the S6E2HG device.
4. Run the Serial Port Viewer, set the baud rate as
115200
, and click the
Disconnected
button to connect the board with PC, as described in
section
Figure 4-1: Select the Baud Rate