Nuvoton
/
NuMaker-mbed-PWM1_DCservo
NuMaker PWM1 drive +5V DC servo motor
README.md@12:c7ca6b6c7fbc, 2021-02-25 (annotated)
- Committer:
- SHLIU1@OANBE02333.nuvoton.com
- Date:
- Thu Feb 25 11:24:43 2021 +0800
- Revision:
- 12:c7ca6b6c7fbc
- Parent:
- 3:59536611f5af
Support the both V5.X and V6.X for mbed-os
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shliu1 |
3:59536611f5af | 1 | # Getting started PWM1 with DC servo motor on mbed OS |
shliu1 |
3:59536611f5af | 2 | |
shliu1 |
3:59536611f5af | 3 | |
shliu1 |
3:59536611f5af | 4 | ### Import NuMaker-mbed-PWM1_DCservo from on-line IDE |
shliu1 |
3:59536611f5af | 5 | 1. Please choose Nuvoton NuMaker-PFM-XXX as your target platform. |
shliu1 |
3:59536611f5af | 6 | 2. Please press the left-up icon "New", then choose "NuMaker PWM1 drive + 5V DC servo motor" from the template list. |
shliu1 |
3:59536611f5af | 7 | 3. Your NuMaker-mbed-PWM1_DCservo program is existed. |
shliu1 |
3:59536611f5af | 8 | |
shliu1 |
3:59536611f5af | 9 | #### Now compile |
shliu1 |
3:59536611f5af | 10 | Please press compile icon. |
shliu1 |
3:59536611f5af | 11 | |
shliu1 |
3:59536611f5af | 12 | #### Burn Code & Execute |
shliu1 |
3:59536611f5af | 13 | 1. Connect the board NuMaker-PFM-XXX with your PC by USB cable, then there will be one "mbed" disk. |
shliu1 |
3:59536611f5af | 14 | 2. Copy the built binary file into "mbed" disk on you PC. |
shliu1 |
3:59536611f5af | 15 | 3. Press device's reset button to execute, and you could get the below log by uart console. |
shliu1 |
3:59536611f5af | 16 | ------------------------------------------------------------------------------- |
shliu1 |
3:59536611f5af | 17 | ...DCserv Start... |
shliu1 |
3:59536611f5af | 18 | DCservo pulse width = 500 |
shliu1 |
3:59536611f5af | 19 | DCservo pulse width = 700 |
shliu1 |
3:59536611f5af | 20 | |
shliu1 |
3:59536611f5af | 21 | : |
shliu1 |
3:59536611f5af | 22 | : |
shliu1 |
3:59536611f5af | 23 | ...DCserv End..... |
shliu1 |
3:59536611f5af | 24 | -------------------------------------------------------------------------- |
shliu1 |
3:59536611f5af | 25 | PWM1 outputs to drive DC servo motor |