LEDC: The values of "ledc_timer_bit_t"
Posted: Sun May 14, 2017 3:48 pm
While studying LEDC, I was looking at the "ledc_timer_bit_t". This has a set of predefined values of:
Hunting around, I found this fragment of source:
https://github.com/igrr/esp32-cam-demo/ ... era.c#L100
... and working backwards from there, I find that the defined values for "ledc_timer_bit_t" are actually simple numerics giving:
Am I on a good path here? Is there some merit in using low bit numbers ... for example, to achieve high frequency / low granularity (eg. a high speed square wave).
For example ... (and this is theory) ...
A bit size of 3 would seem to give me 10MHz period?
- LEDC_TIMER_10_BIT
- LEDC_TIMER_11_BIT
- LEDC_TIMER_12_BIT
- LEDC_TIMER_13_BIT
- LEDC_TIMER_14_BIT
- LEDC_TIMER_15_BIT
Hunting around, I found this fragment of source:
https://github.com/igrr/esp32-cam-demo/ ... era.c#L100
... and working backwards from there, I find that the defined values for "ledc_timer_bit_t" are actually simple numerics giving:
- LEDC_TIMER_10_BIT = 10
- LEDC_TIMER_11_BIT = 11
- LEDC_TIMER_12_BIT = 12
- LEDC_TIMER_13_BIT = 13
- LEDC_TIMER_14_BIT = 14
- LEDC_TIMER_15_BIT = 15
Am I on a good path here? Is there some merit in using low bit numbers ... for example, to achieve high frequency / low granularity (eg. a high speed square wave).
For example ... (and this is theory) ...
A bit size of 3 would seem to give me 10MHz period?