Skip to content

Commit b14d025

Browse files
author
SimonePDA
authored
Update analogWriteResolution.adoc
Updated board related details
1 parent a707922 commit b14d025

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

Language/Functions/Zero, Due & MKR Family/analogWriteResolution.adoc

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,28 @@ subCategories: [ "Zero, Due & MKR Family" ]
2121

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

24-
The Due has the following hardare capabilities
24+
The *Due* has the following hardare capabilities:
25+
2526
* 12 pins which default to 8-bit PWM, like the AVR-based boards. These can be changed to 12-bit resolution.
26-
* Pns with 12-bit DAC (Digital-to-Analog Converter).
27+
* 2 pins with 12-bit DAC (Digital-to-Analog Converter)
2728

2829
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.
30+
31+
32+
The *Zero* has the following hardare capabilities:
33+
34+
* 10 pins which default to 8-bit PWM, like the AVR-based boards. These can be changed to 12-bit resolution.
35+
* 1 pin with 10-bit DAC (Digital-to-Analog Converter).
36+
37+
By setting the write resolution to 10, you can use `analogWrite()` with values between 0 and 1023 to exploit the full DAC resolution
38+
39+
40+
The *MKR Family* of boards has the following hardare capabilities:
41+
42+
* 4 pins which default to 8-bit PWM, like the AVR-based boards. These can be changed from 8 (default) to 12-bit resolution.
43+
* 1 pin with 10-bit DAC (Digital-to-Analog Converter)
44+
45+
By setting the write resolution to 12 bits, you can use `analogWrite()` with values between 0 and 4095 for PWM signals; set 10 bit on the DAC pin to exploit the full DAC resolution of 1024 values.
2946
[%hardbreaks]
3047

3148

0 commit comments

Comments
 (0)