Hi,
Can you clarify the situation with Fast PWM on A0 on the gen2 board?
I'm getting:
sketch_oct03d.ino: In function 'void setup()':
sketch_oct03d:20:3: error: 'zunoFastPWMInit' was not declared in this scope
zunoFastPWMInit(0);
^~~~~~~~~~~~~~~
And I do not find any reference to zunoFastPWM*() functions in Z-Uno2 package too...
--
L.
Z-Uno Gen2 and Fast PWM
Re: Z-Uno Gen2 and Fast PWM
Hi,
There is no division to "fast/slow" in Z-Uno2. All PWMs are fast in CortexM4. Thats why we didn't add zunoFastPWM* functions for Z-Uno2. What do you want to achive by means of "fast" PWM? You can use analogWrite() for most cases on any pins. At one moment you can use up to 4 channels of PWM.
There is no division to "fast/slow" in Z-Uno2. All PWMs are fast in CortexM4. Thats why we didn't add zunoFastPWM* functions for Z-Uno2. What do you want to achive by means of "fast" PWM? You can use analogWrite() for most cases on any pins. At one moment you can use up to 4 channels of PWM.
Re: Z-Uno Gen2 and Fast PWM
Ok, with analogWrite() I could specify duty cycle but how can I configure frequency on PWM* pins? Something similar to zunoFastPWMSet(low, high)?
I have 24V fan which speed can be controlled by 5V PWM duty cycle signal at ~25kHz.
I have 24V fan which speed can be controlled by 5V PWM duty cycle signal at ~25kHz.
Re: Z-Uno Gen2 and Fast PWM
does the silence mean that gen2 not capable of 25khz pwm? I mean I tried gpt timers and digitalWrite() on multiple outputs too
but were not able to go higher than 8-9khz (measured by cheap multimeter) and it was not stable - duty cycle seemed to "jump around". Out of ideas
except to use somekind of external pwm generator.
but were not able to go higher than 8-9khz (measured by cheap multimeter) and it was not stable - duty cycle seemed to "jump around". Out of ideas
except to use somekind of external pwm generator.
Re: Z-Uno Gen2 and Fast PWM
Hi,
try analogWriteFrequency(freq)
freq: New PWM frequency in Hz units. The range is [488;8000000] Hz.
Michael
try analogWriteFrequency(freq)
freq: New PWM frequency in Hz units. The range is [488;8000000] Hz.
Michael