pwm-gpio-custom

15 views
Skip to first unread message

Nathan

unread,
Feb 8, 2012, 9:18:04 AM2/8/12
to Bifferboard
I have setup the pwm-gpio-custom option. However it does not appear to
work. I tried to do exactly as shown on the site
http://sites.google.com/site/bifferboard/Home/pwm-gpio and I don't get
good results. Sometimes the LED (for testing) just turns on and stays
on, but just as often it does nothing. I've tried very small changes
(like 50/50 or 10/100) but it never toggles even once.

Nathan

unread,
Feb 8, 2012, 1:15:16 PM2/8/12
to Bifferboard
Also, everything appears to be in order in the /sys/class/pwm/...
directory. I have every directory as per the instruction page.
However, the instruction page mentions the "request" file but not what
you should expect to see in it. I cat'd it and it just says "sysfs
1234" where the number appears to be some kind of reference.

On Feb 8, 9:18 am, Nathan <nathan.vanfl...@gmail.com> wrote:
> I have setup the pwm-gpio-custom option. However it does not appear to
> work. I tried to do exactly as shown on the sitehttp://sites.google.com/site/bifferboard/Home/pwm-gpioand I don't get

nicolas le falher

unread,
Feb 8, 2012, 1:19:26 PM2/8/12
to biffe...@googlegroups.com
Hi,

Request file is just for init a hardcoded variable.
Which kernel have you used ?

Nicolas

Nathan

unread,
Feb 8, 2012, 3:06:44 PM2/8/12
to Bifferboard
2.6.37.6

nicolas le falher

unread,
Feb 8, 2012, 4:12:16 PM2/8/12
to biffe...@googlegroups.com
It works for me.


>just turns on and stays on
It's normal, with pwm you reduce luminosity for a led.
Are you looking for a blink mode ?

Nicolas

Nathan

unread,
Feb 8, 2012, 4:50:56 PM2/8/12
to Bifferboard
But sometimes not at all. I also tried to lower the MHz so that I
might see the blink, but it wouldn't. I also swapped polarity too to
try and see if it toggled things in that way, not so much.

Nathan

unread,
Feb 8, 2012, 4:52:57 PM2/8/12
to Bifferboard
Is there anywhere to test or debug it? I am going to try to connect it
more directly and see if there is an affect.

nicolas le falher

unread,
Feb 8, 2012, 4:57:08 PM2/8/12
to biffe...@googlegroups.com
It depends what do you make ? Explain it.

Nicolas

Nathan

unread,
Feb 8, 2012, 11:09:39 PM2/8/12
to Bifferboard
I took another look tonight when I had more time. It appears to
actually work. It's a little strange since I might set the period to
100000000 and the duty 10000000 and then change the period to
something less than the duty 1000000 which makes it pretty much turn
off. It's a little strange since dealing with the big UL and and
wanting duty to be more of a percentage than a correlated number. I am
not able to get it to work a low Hz speed, only maybe enough to kind
of notice the blinking. But that's not too important as long as I know
it's working.

Thanks,

-Nathan

Andrew Scheller

unread,
Feb 9, 2012, 7:06:43 AM2/9/12
to biffe...@googlegroups.com
> off. It's a little strange since dealing with the big UL and and
> wanting duty to be more of a percentage than a correlated number. I am

That's just a case of writing some wrapper code ;)

> not able to get it to work a low Hz speed, only maybe enough to kind
> of notice the blinking.

That's the whole point of PWM - so that you don't notice the blinking.
You use PWM (switching a digitial IO on and off at high frequency) so
that a digital output pin can 'emulate' a variable voltage output pin.
http://arduino.cc/it/Tutorial/PWM

If you want 'visible blinking' try looking at
https://sites.google.com/site/bifferboard/Home/desktop-linux-distributions/slackware/gpio/flash-red-led
https://sites.google.com/site/bifferboard/Home/bifferboard-mini-distribution/gpio/flash-red-led

or
https://sites.google.com/site/bifferboard/Home/desktop-linux-distributions/slackware/rtai
https://sites.google.com/site/bifferboard/openwrt-svn/rtai

Yeah, much of the info on the wiki is out of date, but it should be
possible to "adapt" it...

Lurch

Reply all
Reply to author
Forward
0 new messages