micropython icon indicating copy to clipboard operation
micropython copied to clipboard

Set PWM frequency to 10kHz

Open Bhavithiran97 opened this issue 5 years ago • 1 comments

Hi, I wanna set the pwm frequency to 10kHz, but the minimum value for set_analog_period_microseconds is 256us which results in 3.91kHz. I can set to 10kHz in makecode. Is there any other way for me to set the pwm frequency to 10kHz ?

Bhavithiran97 avatar Jan 31 '20 09:01 Bhavithiran97

Yes with arm thumb 2 assembly see this repository https://github.com/rhubarbdog/microbit-assembly for some example code. The examples are mainly for version 2 microbial. Be careful with high frequencies from 30khz dogs are affected at 50khz rats and mice will be attracted

rhubarbdog avatar Nov 07 '22 18:11 rhubarbdog