Replies: 1 comment
-
You shouldn't have to mess with the RTC clocks to make waveforms if you have a DAC. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've been trying to generate simple sine-wave tones using the ESP32's DAC. This article has much of the code to do it: ESP32 In MicroPython: Using Hardware Registers.
Unfortunately, this code only allows very crude steps between frequencies, resulting in truly awful approximation of tunes (for instance: https://xoxo.zone/@scruss/112759584284282346 — beware, it sounds terrible). What I think I'm looking for is the
RTC_CNTL_CK8M_DIV_SEL
field in the registerRTC_CNTL_CLK_CONF_REG
, but I'm not sure where that is or how it's applied. Can anyone help, please?I know I'll likely need to iterate values for this divider along with the frequency step, as suggested in this Arduino code: DacTone/DacTone.cpp · bhall66/DacTone. But that will come after learning a bit more about mem32 things on esp32
Beta Was this translation helpful? Give feedback.
All reactions