1

In regards to the arduino which has pwm pins, can I use these pins as normal input/output digital pins or not? Thanks in advance.

  • 2
    have you tried? – jsotola Jun 23 at 20:21
  • 1
    Not directly related to the question but perhaps noteworthy, you can also use the Analog-In pins as regular digital IO. – towe Jun 24 at 6:23
  • Yes that is true and an often overlooked fact. Indeed most pins have multiple functions. Arduino pinout diagrams are extremely useful to see what an individual pin is capable of. Most have more than one function. Some have more than two functions. – GMc Jun 24 at 23:02
5

Yes you can use them as ordinary digital io pins. PWM is essentially a normal digital output pin that is repeatedly turned on and off at a high rate.

The magic is that the turning off and on is done in the hardware according to the duty cycle (I.e. there is no need for software to perform the on/off operations) . This is why only some pins can do h/w PWM, because the PWM hardware is not added on to all pins.

If you are not using the pin for PWM, it is available for you to use as required.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.