If say I use AS5048A magnetic encoder, to be able to find the angle at such high rpm, would it still be possible to use PWM? Or do I have to use the digital read? In that case, how would I program it?