Main Site Documentation

PWM on mountaineer eth


#1

Hello to all,
the beginner, I have to generate a square wave of frequency 36k to test a component. I can not find the code that can help me.
I started from here

PWM m1pwm = new PWM (Socket4.Pwm7, 36000, 50, true);

but it remains high and not swing
thanks
En.


#2

Welcome to the forum!

Check this documentation:

http://www.ghielectronics.com/docs/18/pwm


#3

Did you call m1pwm.Start()?

Cuno


#4

Thank you all,
was wrong in giving her a dutycyle of 50 I had to give 0.5
Thanks to Architect and Cuno very helpful post!!
thanks


#5

Glad to help!