Reference for analogWrite

The reference page for analogWrite says

After a call to analogWrite(), the pin will generate a steady square wave of the specified duty cycle

.

No. Unless the duty-cycle is 50%, the pin will generate a steady rectangular wave.

Thanks for pointing this out AWOL! I have submitted a pull request to correct the information:

I don't think that the phrase "square wave" is automatically assumed to be a wave with equal mark and space periods. I think it is usually just used to mean a wave with vertical sides and horizontal tops to distinguish it from (for example) triangle waves and sine waves.

...R

Robin2:
I don't think that the phrase "square wave" is automatically assumed to be a wave with equal mark and space periods.

Perhaps it should be.

Edit: Even Wikipedia seems to agree

A square wave is a non-sinusoidal periodic waveform in which the amplitude alternates at a steady frequency between fixed minimum and maximum values, with the same duration at minimum and maximum

“I think it is usually just used to mean a wave with vertical sides and horizontal tops to distinguish it from (for example) triangle waves and sine waves.”

Yes

FWIW I would always assume square wave to mean equal on/off period.