Application | This example code uses the M2A23 series microcontroller (MCU) to control the pointer of the agricultural machinery dashboard. |
BSP Version | M2A23_Series_BSP_CMSIS_V3.00.001 |
Hardware | NuMaker-M2A23SG V0.1 |
This example code is based on the M2A23 platform and implements precise control of a dedicated two-phase, four-wire stepper motor. It is suitable for pointer drive applications on agricultural machinery dashboards and various other instruments. The system primarily includes two core functions:
Automatic Zeroing Calibration at Startup: When the system starts, the motor first locates the mechanical zero point to establish a physical reference. It then calibrates to the dashboard zero point, ensuring accurate pointer indication.
Periodic Reciprocating Motion: After initialization, the system controls the pointer to perform periodic reciprocating swings between the "zero point" and the "set target position" to verify the driving performance.
You can download the sample code at EC_M2A23_DashBoard_Control_V1.00.zip.
| 欢迎光临 牛卧堂MCU技术交流 (http://nuvoton-mcu.com/) | Powered by Discuz! X3.2 |