Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set PWM frequency to 10kHz #673

Open
Bhavithiran97 opened this issue Jan 31, 2020 · 1 comment
Open

Set PWM frequency to 10kHz #673

Bhavithiran97 opened this issue Jan 31, 2020 · 1 comment

Comments

@Bhavithiran97
Copy link

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 ?

@rhubarbdog
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants