From bc8deba8a604914b2da4ccfc29c9a53b2faeb0fe Mon Sep 17 00:00:00 2001 From: Bexin3 <88098139+Bexin3@users.noreply.github.com> Date: Sat, 14 Jan 2023 00:58:13 +0000 Subject: [PATCH] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a45d72b..f9528c2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ # Fast-Analog-to-PWM-for-SAMD21-Arduino -A .ino project for SAMD21 Arduinos tested on Arduino Zero that allows conversion of Analog values into PWM duty cycle, tested frequencies are 0.00271-200000hz +A .ino project for SAMD21 Arduinos tested on Arduino Zero that allows conversion of Analog values into PWM duty cycle, tested frequencies are 0.00281-200000hz Newer versions support m0 seeduino xiao and custom choosing of analog input and PWM output pins, as well as higher frequency range. Newest version has added a support for use of the DAC as an internal voltage reference. Defualtly it is set to produce half the voltage. This voltage has its output at A0 so dont use it for the ADC in this mode. Instead you can for example connect GND of a sound card, or well analog signal that goes below 0v to A0, and the positive to your selected ADC pin, so you can also meassure negative values. In cases like this having "GND" value on ADC pin would result in 50% duty cycle. For this use its recommended to set up gain, and minimum as well as maximum value the card may output, though I recommend turning of compensation and doing this manually. Make sure the value doesnt go under minimum set as that would cause an overflow, and with something like a soundcard minimum and maximum should be roughly similar magnitude.