![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
FRDM-K64 PWM basic demo
Revision 0:24a5f9b6fd64, committed 2014-07-09
- Comitter:
- APanecatl
- Date:
- Wed Jul 09 19:31:42 2014 +0000
- Commit message:
- rev 1.0
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jul 09 19:31:42 2014 +0000 @@ -0,0 +1,22 @@ +#include "mbed.h" + +//PWM output channel +PwmOut PWM1(A5); + +int main() +{ + PWM1.period_ms(500); + int x; + x=1; + + while(1) + { + PWM1.pulsewidth_ms(x); + x=x+1; + wait(.1); + if(x==500) + { + x=1; + } + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jul 09 19:31:42 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/024bf7f99721 \ No newline at end of file