The new Raspberry Pi B Model B+ is here - Pick one up in the store and check our detailed guide!

How to use PWM for Arduino Due and make an LED blinking

by henrimontreal on Sat Mar 30, 2013 2:43 pm

Hi folks,

I have a question for you and wonder if you can kindly guide me.

I don't know why the data sheet of Arduino Due is difficult to me to understand.

I just want to use PWM to make some LEDs blink. I found some register such as PWM_ENA to enable the PWM and the others to
do this purpose but don't know how to make it work and change the frequency.

By any chance, has anyone done this job before?

This is really urgent and I am so frustrated!

I really appreciate if you can give me some hints.

Due is totally different from Uno to use PWM stuff.

Thank you in advance.
henrimontreal
 
Posts: 1
Joined: Sat Mar 30, 2013 2:40 pm

Re: How to use PWM for Arduino Due and make an LED blinking

by franklin97355 on Sat Mar 30, 2013 3:24 pm

Using PWM you probably will not see the LED blink because the rate is too high to see. You need to turn the oin on, wait a bit (500ms or so) and then turn the pin off and wait. This will be visible to humans.
User avatar
franklin97355
 
Posts: 3838
Joined: Mon Apr 21, 2008 1:33 pm