找回密码
 立即注册

QQ登录

只需一步,快速开始

开启左侧

[M251/M252] PWM Capture Rotary

[复制链接]
admin 发表于 2025-9-19 13:16:24 | 显示全部楼层 |阅读模式
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


牛卧堂
回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies |上传

本版积分规则

新唐MCU