• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

boards/18-Mar-2025-6857

src/18-Mar-2025-11788

CMakeLists.txtD18-Mar-2025288 107

KconfigD18-Mar-2025299 149

README.rstD18-Mar-20251.3 KiB4931

prj.confD18-Mar-2025126 62

sample.yamlD18-Mar-2025166 109

README.rst

1.. zephyr:code-sample:: renesas_comparator
2   :name: Renesas comparator
3
4   Monitor the output of comparator.
5
6Overview
7********
8
9A sample that help to monitor the output of comparator.
10
11Hardware Setup
12**************
13
14* The IVREF is connected to the internal output of DA0 (DAC module).
15  By default, DA0 is set to ~1.75V (half of the full-scale voltage).
16
17* For IVCOMP, the user can connect the IVCMP3 input to either:
18
19   * Case 1: IVCMP3 with SW0 (button on board, on ek_ra8m1 is P600).
20   * Case 2: IVCMP3 with external voltage for comparison.
21
22Building and Running
23********************
24
25This application can be built and executed on RA boards as follows:
26
27.. zephyr-app-commands::
28   :zephyr-app: samples/boards/renesas/comparator
29   :board: ek_ra8m1
30   :goals: build flash
31   :compact:
32
33The comparator's output controls LED0:
34
35   * If the comparator output is HIGH, LED0 turns on.
36   * If the comparator output is LOW, LED0 turns off.
37
38   Example case:
39
40   * Case 1: IVCMP3 connected to SW0 (Pull up)
41
42      * SW0 not pressed --> Comparator output HIGH --> LED0 on
43      * SW0 pressed --> Comparator output LOW --> LED0 off
44
45   * Case 2: IVCMP3 connected to another reference voltage
46
47      * IVCMP3 HIGH --> Comparator output HIGH --> LED0 on
48      * IVCMP3 LOW --> Comparator output LOW --> LED0 off
49