Search found 4 matches

by zennya
Mon Sep 16, 2024 9:24 am
Forum: General Discussion
Topic: Can ESP32 alone can generate 40MHz square wave using LEDC library?
Replies: 5
Views: 1276

Re: Can ESP32 alone can generate 40MHz square wave using LEDC library?

sketch_sep15a:2:3: error: 'ledc_timer_config_t' was not declared in this scope indicates that your code may be lacking an #include "driver/ledc.h" Not sure about Arduino vs. IDF (versions, dependencies,...) though, so it may be easier to use Arduino only: https://espressif-docs.readthedocs-hosted.c...
by zennya
Mon Sep 16, 2024 8:20 am
Forum: General Discussion
Topic: My First Component
Replies: 5
Views: 1426

Re: My First Component

Well, I finally did it! I have a properly doumented, well designed (I hope) and published OSS project, a component for the ESP32 family for the ESP-IDF. It is a library to interface to the DS3231 RTC module that one finds all over Amazon. I call it esp-idf-ds3231 . I am still newish to C programmin...
by zennya
Mon Sep 16, 2024 6:23 am
Forum: General Discussion
Topic: Can ESP32 alone can generate 40MHz square wave using LEDC library?
Replies: 5
Views: 1276

Re: Can ESP32 alone generate 40MHz square wave using LEDC library?

Try it like this: ledc_timer_config_t ledc_timer { }; ledc_timer.speed_mode = LEDC_HIGH_SPEED_MODE; ledc_timer.timer_num = LEDC_TIMER_0; ledc_timer.bit_num = 2; ledc_timer.freq_hz = 20000000; And yes, the LEDC should be able to generate a 40MHz square wave, cf. https://docs.espressif.com/projects/e...
by zennya
Sat Sep 14, 2024 11:00 am
Forum: General Discussion
Topic: Can ESP32 alone can generate 40MHz square wave using LEDC library?
Replies: 5
Views: 1276

Can ESP32 alone can generate 40MHz square wave using LEDC library?

Hi, I happen to surf around this forum and found interesting, but old (currently uncompilable codes under ESP-IDF 5) codes. Fyi, https://esp32.com/viewtopic.php?t=1037#p14480 provides an example to generate 20MHz square wave at 50% duty on GPIO18 using LEDC library alone. Being new to the esp32 and ...