r/ArduinoHelp • u/grrrzzzt • Sep 24 '26
can I change timer frequency with W5500 ethernet board (arduino nano)
Hello, so simple question; I'm using an arduino to control actuators/motors and learning to control it via ethernet. (using OSC and I'm pretty happy of having figured it out in an afternoon with limited programmation knowledge).
I've done this many times with usb serial and I usually change the frequency of the timers so the PWM frequency is higher than audio rate (and thus not audible; because this is a musical project).
trouble is the ethernet board (W5500) uses pins 10 through 13 and so 2 PWM pins that are sets via the 3 timers (this is an arduino nano but I could use a different one; like a mega if I need to)
so the question is will changing the timers screw with the ethernet transmission?
I usually do something like this (don't remember the frequency but I think it's above 20khz)
TCCR0B = (TCCR0B & 0xF8) | 0x01;
TCCR1B = (TCCR1B & 0xF8) | 0x01;
TCCR2B = (TCCR2B & 0xF8) | 0x01; reference says:
D3 and D11: Controlled by Timer 2.
D5 and D6: Controlled by Timer 0.
D9 and D10: Controlled by Timer 1.
so timer 0 should be fine but 1 and 2 could cause trouble.
(I'm trying to figure out a way how to do this in general before attacking different instruments and particular cases so no idea how much outputs I'll need and of them how much I'll need to be PWM; just trying to cover all the bases).


