Enabling servo usage on boards with PWM current control timer5 is used by some boards like the Mini Rambo for controlling motor current via PWM, see stepper.cpp. ```cpp #ifdef MOTOR_CURRENT_PWM_XY_PIN pinMode(MOTOR_CURRENT_PWM_XY_PIN, OUTPUT); pinMode(MOTOR_CURRENT_PWM_Z_PIN, OUTPUT); pinMode(MOTOR_CURRENT_PWM_E_PIN, OUTPUT); digipot_current(0, motor_current_setting[0]); digipot_current(1, motor_current_setting[1]); digipot_current(2, motor_current_setting[2]); //Set timer5 to 31khz so the PWM of the motor power is as constant as possible. (removes a buzzing noise) TCCR5B = (TCCR5B & ~(_BV(CS50) | _BV(CS51) | _BV(CS52))) | _BV(CS50); #endif } ``` Using the same timer for controlling servos results in loss of motor control. So use timer4/3 for those boards instead. [See discussion here.](http://shop.prusa3d.com/forum/software-f13/enabling-auto-leveling-in-firmware-t416-s40.html)
|
|
||
60 |
|
60 |
|
61 |
|
61 |
|
62 |
|
62 |
|
63 |
|
|
|
64 |
|
63 |
|
65 |
|
64 |
|
66 |
|
65 |
|
67 |
|
|
|
68 |
|
|
|
|
66 |
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
|
|
|
73 |
|
|
69 |
|
74 |
|
70 |
|
75 |
|
71 |
|
76 |
|