Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unwanted behavior of PWM config_percent() on Minnow Max #283

Open
cosscat opened this issue Sep 17, 2015 · 4 comments
Open

unwanted behavior of PWM config_percent() on Minnow Max #283

cosscat opened this issue Sep 17, 2015 · 4 comments

Comments

@cosscat
Copy link

cosscat commented Sep 17, 2015

Hello,

Noticed an unwanted behavior of PWM on Minnow Max: 'v0.7.5-55-g5c7bab1'
Try the following:

>>> p=m.Pwm(22)
>>> p.enable(True)
0
>>> p.config_percent(10, 0.5)
0
>>> p.config_percent(10, 0.8)
0
>>> p.config_percent(10, 0.2)
0
>>> p.config_percent(10, 0.8)
0
>>> p.config_percent(10, 0.9)
0
>>> p.config_percent(10, 0.8)
0
>>> p.config_percent(10, 0.9)
0
>>> p.config_percent(10, 0.8)
0
>>> p.config_percent(10, 0.9)
0
>>> p.config_percent(10, 0.7)
0
>>> p.config_percent(10, 0.5)
0
>>> p.config_percent(10, 0.9)

where the first parameter is the period in ms and the second the percentage of "on" state.
You will notice (for an LED) that when doing the p.config_percent(10, 0.9) it will light less than on
p.config_percent(10, 0.5)

@cosscat
Copy link
Author

cosscat commented Sep 17, 2015

same happens for:

p.enable(True)
0
p.period(0.1)
p.pulsewidth(0.05)
0
p.pulsewidth(0.09)

The same behavior is valid for the second PWM pin: 24
It is something related to 90% duty cycle, no matter how one sets it.

@alext-mkrs
Copy link
Contributor

Unfortunately I don't have a MinnowBoard check this out, @cosscat are you able to reproduce this on either generation of Galileos or an Edison (all of which I have)?

@cosscat
Copy link
Author

cosscat commented Dec 2, 2015

Sorry for the late reply,

Things are fine with Galileos ... will update shortly for Edison

@cosscat
Copy link
Author

cosscat commented Dec 3, 2015

Edison is fine too

@alext-mkrs alext-mkrs changed the title unwanted behavior of PWM on Minnow Max Dec 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants