RFQ/BOM 0 로그인 / 등록하다

귀하의 위치를 선택하세요

사용자 이미지

How to use timer interrupt to achieve the effect of breathing light?

Technology
12월 17, 2020 by Ruben 1644

Because the chip does not have hardware PWM, it can only be simulated by software, but it is found to be flickering after testing, and there is no breathing effect.

If you use the delay method, it can be done, but it is too slow for operating efficiency.


My goal is to use the timer interrupt to realize the breathing light. What should I do?

모든 댓글

user image

Esmeralda 게시 날짜 December 17, 2020

The software opens a 40US interrupt and adds 40US to each grid.

0
user image

Alejandra 게시 날짜 December 17, 2020

The timer simulates PWM, only the initial segment is a little bit close.

0
user image

Frederick 게시 날짜 December 17, 2020

Software simulation, just put it in the interrupt.

0
user image

Savanna 게시 날짜 December 17, 2020

In that case, take a variable and set the range to 0-10, then put interrupt, less than 2 the light is on, otherwise the light is off, and the overflow is cleared. Then reverse the state of the light to see if the brightness has changed. This judgment condition is similar to the duty cycle.

0

답변 작성

답글을 달려면 로그인이 필요합니다. 로그인 | 등록하다