![]() * calculates the required waveform generation mode, prescaler and * as close as possible to the provided desired frequency. * Sets the frequency of the timer corresponding to the provided pin * Used by set_pwm_frequency, set_pwm_duty * returns Timer struct containing this information * Grabs timer information and registers of the provided pin #define FAST_PWM_FAN_FREQUENCY 31400 // Define here to override the defaults below Removes the PWM noise but increases heating in the FET/Arduino #define FAST_PWM_FAN // Increase the fan PWM frequency. * USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies. Only use this option if you don't need PWM on 0C2A. But note that this option blocks the use of * A greater range can be achieved by enabling USE_OCR2A_AS_TOP. * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: * Setting very high frequencies can damage your hardware. * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * and not to complete it when users are not aware that the frequency must be specifically set to support the target board. * This F value is only to protect the hardware from an absence of configuration * For non AVR, if left undefined this defaults to F = 1Khz. * i.e., F = 31.4kHz on 16MHz microcontrollers or F = 39.2kHz on 20MHz microcontrollers. * For AVR, if left undefined this defaults to F = F_CPU/(2*255*1) ![]() * to produce a frequency as close as possible to the desired frequency. * Combinations of PWM Modes, prescale values and TOP resolutions are used internally With the same price as 3.2, I'll have unused pins for 2 more fans?Įdited 4 time(s). using another MCU (Attiny85 or ATmega328) to read the 1 kHz PWM and generate 25 kHz accordingly (4$) : I don't know if PLL preserves the duty cycle or notĤ. using PLL frequency multiplier from 1 to 25 kHz :ģ.1. I'll have to send Marlin's fan control commands through I2cģ. using a standalone driver with 25 kHz output like MAX31790 (which I can't source, any alternatives?) : I don't know If there are any unused timers by Marlin or not, and if there are, is it possible without affecting its other functionalities?Ģ. I don't think I need to worry about phase and only need to control the duty cycle and frequency(?)Īfter searching I came up with a couple of options but I don't know which is easier or more plausible so here I am
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |