- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

One question about Edison PWM setting: echo 2000000 > /sys/class/pwm/pwmchip0/pwm3/duty_cycle, what's the scope for Echo 2000000?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi Effy,

While using the **duty_cycle** as **2000000** you will have **~40.64%**. In order to calculate the duty cycle you want to use and the number you have to put in

**/sys/class/pwm/pwmchip0/pwmX/duty_cycle** you need to know that **4950495** is **100%.**

You can use the following equivalence:

duty_cycle =

DutyCycle * 4950495

100

Where **duty_cycle** is the value in */sys/class/pwm/pwmchip0/pwmX/duty_cycle *and

**DutyCycle**is the

*%Duty cycle*you want to use. For example if you want to use

**40%**as

**DutyCycle**you will have as result

**1980198**.

Regards,

Charlie

Link Copied

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi Effy,

While using the **duty_cycle** as **2000000** you will have **~40.64%**. In order to calculate the duty cycle you want to use and the number you have to put in

**/sys/class/pwm/pwmchip0/pwmX/duty_cycle** you need to know that **4950495** is **100%.**

You can use the following equivalence:

duty_cycle =

DutyCycle * 4950495

100

Where **duty_cycle** is the value in */sys/class/pwm/pwmchip0/pwmX/duty_cycle *and

**DutyCycle**is the

*%Duty cycle*you want to use. For example if you want to use

**40%**as

**DutyCycle**you will have as result

**1980198**.

Regards,

Charlie

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi Charlie，thanks very much!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page