Hardware requirements
Mini USB cable
TWR-KM34Z50MV3 board
Personal Computer
Board settings
Turn on the third switch of S1(connect S1-3 to S1-18).
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Connect the analog signal source’s output to the input of used-defined comparator’s channel (defined as “DEMO_CMP_USER_CHANNEL” in source code.)
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Reset the SoC and run the project.
Running the demo
When the demo runs successfully, the following message is displayed in the terminal:
CMP polling Example
Then change CMP analog input, and watch the change of LED.
CMP0_IN1(J11_16) connected to VCC=3.3V: LED ORANGE ON
CMP0_IN1(J11_16) connected to GND: LED ORANGE OFF