牛卧堂MCU技术交流

标题: [M251/M252] PWM Capture Rotary [打印本页]

作者: admin    时间: 2025-9-19 13:16
标题: [M251/M252] PWM Capture Rotary
Application
This example code uses the M251/M252 PWM Capture to detect the rotation direction and count of a Rotary Encoder Switch.
BSP Version
M251/M252/M254/M256/M258 Series BSP CMSIS V3.02.007
Hardware
NuMaker-M252SD

This sample code uses the M251/M252 series to capture the A and B phase square wave signals generated by a rotary encoder switch. By determining the relative position of phases A and B, it identifies the rotation direction and records the rotation position, then outputs the captured results via UART.

You can download the sample code at EC_M251_PWM_Capture_Rotary_Encoder_V1.00







欢迎光临 牛卧堂MCU技术交流 (http://nuvoton-mcu.com/) Powered by Discuz! X3.2