Skip to content

Update analogWriteResolution.adoc #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ subCategories: [ "Zero, Due & MKR Family" ]

`analogWriteResolution()` sets the resolution of the `analogWrite()` function. It defaults to 8 bits (values between 0-255) for backward compatibility with AVR based boards.

The *Due* has the following hardare capabilities:
The *Due* has the following hardware capabilities:

* 12 pins which default to 8-bit PWM, like the AVR-based boards. These can be changed to 12-bit resolution.
* 2 pins with 12-bit DAC (Digital-to-Analog Converter)

By setting the write resolution to 12, you can use `analogWrite()` with values between 0 and 4095 to exploit the full DAC resolution or to set the PWM signal without rolling over.


The *Zero* has the following hardare capabilities:
The *Zero* has the following hardware capabilities:

* 10 pins which default to 8-bit PWM, like the AVR-based boards. These can be changed to 12-bit resolution.
* 1 pin with 10-bit DAC (Digital-to-Analog Converter).

By setting the write resolution to 10, you can use `analogWrite()` with values between 0 and 1023 to exploit the full DAC resolution


The *MKR Family* of boards has the following hardare capabilities:
The *MKR Family* of boards has the following hardware capabilities:

* 4 pins which default to 8-bit PWM, like the AVR-based boards. These can be changed from 8 (default) to 12-bit resolution.
* 1 pin with 10-bit DAC (Digital-to-Analog Converter)
Expand Down