Re arduino port functions.

Hi.
Rather stupid question from an Arduino newbe . But Anyway..

When stated in the Arduino doc .....
That an port is ex Pwm Analog or something else, .. Is the ports function
hard coded, or can you use it as en digital port to ex drive leds??

tore

Hi tore,

I'm not sure if I'm answering what you asked, but yes, you can use pins that support pwm as digital output. Write digital output with the builtin function digitalWrite(), and use pwm with analogWrite().

A PWM pin is a digital pin.
Write a simple sketch to prove this to yourself.

.

Thanks for good answers..