samples/sensor/mcux_lpcmp/README.html · samples/sensor/mcux_lpcmp/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Samples · Sensor · Comparator

NXP MCUX low-power comparator

Port 7 DAC voltage와 port 0 외부 voltage를 비교하고 output 변화를 console에서 확인합니다.

Official pathsamples/sensor/mcux_lpcmp/README.html
Source filesamples/sensor/mcux_lpcmp/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

VREF 공식, DAC attribute, schematic 확인 조건과 J2-17 build를 설명합니다.

Negative

Port 7 · DAC

Positive

Port 0

Board pin

J2-17

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 7442A5A45C2D77777E180D469F6A4242A267CF235CE23486F550260C935B994E
.. _mcux_lpcmp:

NXP MCUX Low-power Analog Comparator (LPCMP)
############################################

Overview
********

This sample show how to use the NXP MCUX Analog Comparator (LPCMP) driver.

In this application, the negative input port of the LPCMP is set to 7 which
means the input voltage comes from the LPCMP internal DAC, the reference
voltage of the DAC is set to 0 (for the specific chip, the user needs to
check the reference manual to confirm where this reference voltage comes
from), the output voltage of the DAC is equal to (VREF/256)*(data+1), where
data is set through the attribute ``SENSOR_ATTR_MCUX_LPCMP_DAC_OUTPUT_VOLTAGE``.
The positive input port is set to 0, the user needs to check the reference
manual and board schematic to confirm which specific port is used and can
connect an external voltage to that port and change the input voltage to
see the output change of the LPCMP.

The output value of the LPCMP is reported on the console.

Building and Running
********************

Building and Running for NXP FRDM-MCXN947
=========================================
Build the application for the :ref:`frdm_mcxn947` board, and adjust the
LPCMP positive input port voltage by changing the voltage input to J2-17.

.. zephyr-app-commands::
   :zephyr-app: samples/sensor/mcux_lpcmp
   :board: frdm_mcxn947//cpu0
   :goals: build flash
   :compact:

Part 3

한국어 전문 번역

개요

NXP MCUX Low-power Analog Comparator(LPCMP) driver 사용법을 보여 주는 sample입니다.

이 application에서 LPCMP negative input port는 7로 설정되며, input voltage는 LPCMP internal DAC에서 옵니다. DAC reference voltage는 0으로 설정됩니다. 이 reference voltage의 실제 source는 chip마다 다를 수 있으므로 reference manual에서 확인해야 합니다.

DAC output voltage는 (VREF/256)*(data+1)이며, data는 SENSOR_ATTR_MCUX_LPCMP_DAC_OUTPUT_VOLTAGE attribute로 설정합니다.

Positive input port는 0으로 설정됩니다. 실제 사용하는 port는 reference manual과 board schematic에서 확인해야 합니다. 해당 port에 외부 voltage를 연결하고 input voltage를 바꾸면 LPCMP output 변화를 볼 수 있습니다.

LPCMP output value는 console에 보고됩니다.

빌드 및 실행

NXP FRDM-MCXN947에서 빌드 및 실행

frdm_mcxn947 board용 application을 build하고 J2-17에 입력하는 voltage를 바꿔 LPCMP positive-input-port voltage를 조정합니다.

west build -b frdm_mcxn947//cpu0 samples/sensor/mcux_lpcmp
west flash

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.