| Electronic Components Datasheet Search |
|
ESP8266 Datasheet(PDF) 98 Page - ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. |
|
|
|||||||||||||||||||||||||||||
ESP8266 Datasheet(HTML) 98 Page - ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. |
|
98 / 117 page ![]() ! 12. PWM Interface 12.1.3. Configuration • In timing interrupt, to exist the program as soon as possible, timing parameters of the next period of PWM waveform can be loaded when PWM period started. • After the duty ratios of every channel have been configured, the system will call function pwm_start() to calculate timing cycle. Before that, parameters of all current channels will be stored and protected by the system, calculation completion bits will be cleared, too. When PWM period comes, parameters stored by the system will be invoked. • When PWM period is discontinued new parameters will be applied, and flags should be set when the calculation of timing cycle is completed, so that cycles between different colour shade with each new frame and simulate an intermediate shade, achieving higher quality colour. The control of RGB colour lights is an good example of PWM control. • The specific GPIO used can be configured in user_light.h. In our demo SDK, 5 channels of PWM is applied, however, it can be extended to 16 channels. Details on how to extend the channels of PWM is explained in Chapter 3. The minimum resolution can reach 45 ns at 1KHz refresh rate, while the minimum duty ratio can reach 1/22222. 12.1.4. Parameter Specification • Minimum resolution: 45 ns (approximately speaking, the PWM input clock frequency is 22.72 MHz): >14 bit PWM @ 1 kHz • PWM period: 1000 μs (1 KHz) ~ 10000 μs (100 Hz) 12.2. Details on pwm.h 12.2.1. Sample Codes #ifndef __PWM_H__ #define __PWM_H__ #define PWM_CHANNEL_NUM_MAX 8 //8 channels PWM at most struct pwm_single_param { //define the structure of a single PWM parameter uint16 gpio_set; //GPIO needs to be set uint16 gpio_clear; //GPIO needs to be cleared uint32 h_time; //time needs to be written into FRC1_LOAD }; struct pwm_param { //define the structure of PWM parameter Espressif ! /! 90 104 2017.05 |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |