Da komm ich um Widerstände wohl nicht rum

500Hz PWM ist viel zu schnell für Software-PWM. Bei einem Duty von 0.005 ist das ne IRQ-Rate von 100kHz.