cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ 5, 3 & 1

DeAa_335316
New Contributor II

 I am developing one device where i need to turn on  LED when signal become high and turn off LED when signal become low .during the LED blinking i have to control the LED light intensity through push up/down botton or  (through capsence).

   

i have attached a jpg of my input signal which is for turn OFF and ON 10 times in 1 sec .

   

0 Likes
1 Solution
ETRO_SSN583
Esteemed Contributor

Then I would consider using a comparator (simplest) to detect level

   

and in turn in code use that to enable a PWM. When PWM active

   

use its compare value to control duty cycle, hence brightness of

   

LED.

   

 

   

Set PWM period so that it is ~ 100 Hz or more to avoid flicker in LED.

   

 

   

Note timer would work here as well. Or SSDM module, it will result in

   

better EMI reduction.

   

 

   

Regards, Dana.

View solution in original post

0 Likes
14 Replies