Go Down

Topic: AnalogWrite (Read 746 times) previous topic - next topic

vindicate

Just a weird questions

When using PWM you use the analogwrite command.  Anyone know why they chose analogwrite, because technically PWM is still digital.  It's just turning on and off really fast.

FusiveResonance

From a high level perspective, does it not appear to you that you are actually controlling the analog voltage output on that pin?

To your mother (who I presume won't understand this stuff), analogWrite appears to simply write an analog voltage on that pin. She doesn't know what PWM is and she doesn't even care.

jluciani

If you filter the PWM signal with a capacitor you will get an analog value.
One of the features missing from the ATmega168/328 is a DAC. Doing a
PWM DAC is a reasonable compromise.

(* jcl *)

------------------------------------
www: http://www.wiblocks.com
twitter: http://twitter.com/wiblocks
blog: http://luciani.org


Grumpy_Mike


Go Up