Monday, June 24, 2024

Making an audio frequency counter using an RP2040

The AUDIODiWHY blog wanted to build a clock multiplier for the bench, but needed a way to accurately read frequencies of incoming signals. Between 10hz and 100K.

The firmware for the reader is based on a cool RP2040 counting algo by Jeremy P. Bentham–see his blog post here and github page here.

I modified it a little, but not much, and made it display observed frequencies on a small OLED display using David Schram’s open source C library for SSD1306’shere.

A few minor code changes were needed, for instance, the frequency reading algorithm put the frequency value into an integer in memory, but for the  Schram1306 library I needed a string.

Check out how it was done in the post here.

No comments:

Post a Comment