Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: blackheart on March 20, 2009, 03:49:06 PM

Title: Arduino Digital Pins...1 and 2, 13 and PWM...urgent answer needed please!
Post by: blackheart on March 20, 2009, 03:49:06 PM
Hello?

Can I use PWM pins on the arduino as normal digital output pins? I suppose I can, but I want to be sure.

Can I use pin 13 for anything other than LED? I want to hook it up to stby pin on a motor driver to activate it.

Can I use pins 1 and 2 digital for normal digital use?


Thank You!
Title: Re: Arduino Digital Pins...1 and 2, 13 and PWM...urgent answer needed please!
Post by: pomprocker on March 20, 2009, 04:04:33 PM
yes, yes, yes
Title: Re: Arduino Digital Pins...1 and 2, 13 and PWM...urgent answer needed please!
Post by: blackheart on March 20, 2009, 05:00:32 PM
Thank YoU!
Title: Re: Arduino Digital Pins...1 and 2, 13 and PWM...urgent answer needed please!
Post by: offy on March 21, 2009, 09:45:58 PM
You can but it is not recommended. You could run into some problems.
Title: Re: Arduino Digital Pins...1 and 2, 13 and PWM...urgent answer needed please!
Post by: chelmi on March 21, 2009, 11:28:41 PM
You can but it is not recommended. You could run into some problems.

The only "problem" you could run into is that the pin wont be available anymore...
I dont see why it is not recommended...
Title: Re: Arduino Digital Pins...1 and 2, 13 and PWM...urgent answer needed please!
Post by: SmAsH on March 21, 2009, 11:38:42 PM
You can but it is not recommended. You could run into some problems.

The only "problem" you could run into is that the pin wont be available anymore...
I dont see why it is not recommended...
you mean for the led? you can still have the led there and just have a socket and unplug the led if you want to use the servo side of things?
Title: Re: Arduino Digital Pins...1 and 2, 13 and PWM...urgent answer needed please!
Post by: Ro-Bot-X on March 21, 2009, 11:52:07 PM
Pins digital 0 and 1 are also serial pins. If you use them as digital input-output do not declare and use the serial port.

Pin digital 13 has a LED in series with a 1k resistor solderd on board. You can use this pin as output (the LED will flicker) but as input it depends, it's pulled LOW, so make sure you don't turn on the internal pull up resitor. You can use a push button for example, tied to Vcc.

PWM is just another function of those pins, the primary function is input-output, so you're fine.
Title: Re: Arduino Digital Pins...1 and 2, 13 and PWM...urgent answer needed please!
Post by: Hawaii00000 on March 22, 2009, 01:09:11 AM
Are you saying that you can turn the resistor off for pin 13??
Title: Re: Arduino Digital Pins...1 and 2, 13 and PWM...urgent answer needed please!
Post by: SmAsH on March 22, 2009, 01:10:33 AM
internal or external? external no. internal yes