Create Your First Motor Control Application Using MPLAB Harmony v3: Step 6
Hardware Setup
This section describes how to configure the supported hardware.
Mount the ATSAME54 Motor Control Plug-in Module on the U9 header.
Place the External Op-amp Configuration Matrix board at J14.
Connect the motor phases and hall sensor interfaces. Hall and phase connections for Short Hurst motor are given below.
Final Hardware setup
Build, Program, and Observe the Outputs
Go to File > Project Properties and verify the correct debugger is selected under Hardware Tools. Check that XC32 (v2.41) is selected as the Compiler Toolchain for XC32.
Clean and build your application by clicking on the Clean and Build button.
Program your application to the device, by clicking on the Make and Program button.
The project should build and program successfully.
Results
- Press the S2 switch to start the motor.
- Press the S3 switch to toggle the motor direction.
- Vary the potentiometer to change the speed of the motor.
- Press the S2 switch again to stop the motor.
Conclusions
This training module described how to configure and use all the fundamental components needed to build a real-time motor control application on a SAM D5x/E5x microcontroller with the MPLAB Harmony v3 Framework. As a next step, you may customize this application and reconfigure some of the components used in this training module. You could also add new components (PLIBs, etc.) to develop your end application.