Skip to content

maximum tone() frequency? #301

Answered by earlephilhower
stingpie asked this question in Q&A
Discussion options

You must be logged in to vote

200 MHz

I assume you mean kHZ, not MHz :).

The PIO hardware should be able to do up to 125MHZ / 8 = 20MHz (because each loop uses 8 PIO insns).

However, the code in

if (us < 5) {
us = 5;
}
does limit the frequency the API allows to 100kHZ. If you comment that out you should be able to go to 1/2us = 500kHZ.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@stingpie
Comment options

@earlephilhower
Comment options

Answer selected by stingpie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants