Quotejamesdanielv i would recommend in this case to use the defaults that marlin has set. but in case you want the 25khz, the manual for the avr chip has been included with the pages to look at. be sure that prescaller only effects the timer you need best of luck As @Dust pointed out to me earlier I can set Fan_Fast_PWM_Frequency to 25 kHz in configuration_adv.h I just wasn't sure which timeby persiangulf7 - General
I have read the pin map you posted for 2560 and I've read the datasheet before as I wanted to use one of the free timers and change its Prescaler to produce 25 kHz PWM frequency myself before @Dust told me about Fan_Fast_PWM. I was just confused about how Marlin handled it. I wasn't sure if I had to manually define which timer to use for the 25 kHz Fan_Fast_PWM I wanted to set up or not. As I uby persiangulf7 - Firmware - Marlin
/** * (8-bit AVRs only) * * get_pwm_timer * Grabs timer information and registers of the provided pin * returns Timer struct containing this information * Used by set_pwm_frequency, set_pwm_duty * * set_pwm_frequency * Sets the frequency of the timer corresponding to the provided pin * as close as possible to the provided desired frequency.by persiangulf7 - Firmware - Marlin
[email protected] Heater pins and soft PWM fan pins use the digital output function only. They can be assigned to any pin. The temperature timer is used to implement the soft PWM for these pins. Thank youby persiangulf7 - Firmware - Marlin
/** * (8-bit AVRs only) * * get_pwm_timer * Grabs timer information and registers of the provided pin * returns Timer struct containing this information * Used by set_pwm_frequency, set_pwm_duty * * set_pwm_frequency * Sets the frequency of the timer corresponding to the provided pin * as close as possible to the provided desired frequency.by persiangulf7 - General
Thanks, that's so helpful QuoteDust * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2 How do I know which timer it is using? Didn't see any variables for selecting it Does it depend on which pin is used? Or does it use one of the timers marlin use internally? Or should I search config files and define it somewhere else?by persiangulf7 - General
QuoteDust I think timer 3 and 5 is unused Thank you QuoteDust servo uses timer 4 1.Does it mean if I don't use any servos in my setup I can use (/change) timer4 too? or do other functions depend on it? I just saw that 2 of the RAMPS MOSFETs are connected to timer2 (D9-10) and one to timer4 (D8). 2.Does changing timer4 affect the heat bed (D8) function for example? or does using soft PWM forby persiangulf7 - Firmware - Marlin
Hey guys Does anybody know how many timers Marlin uses? Are there any unused timers on Arduino Mega?by persiangulf7 - Firmware - Marlin
Hi guys, I'm running Mega with Marlinfw which to my understanding has its PWM set to 1 kHz. I want to control a 4-wire fan (Pfc0612de) with PWM from 30% to 100% and to reduce noise I've decided to use the manufacturer's recommended 25 kHz (I won't need to read the tacho). I don't think I need to worry about phase and only need to control the duty cycle and frequency(?) After searching I cameby persiangulf7 - General