Hi.. I want to control the intensity of the led ... off state to low intensity then gradually it will increase its intensity to the peak and then again it should reduce and gets off.
How can i perform this task? What component should i use ?
To succesively change the intensity of an LED follow Dana's advice and additionally use a timer that interrupts at certain times, so that you can change the PrISM's density value or the PWM's compare value.
Do not forget to read the Timer's status register in the interrupt handler to clear the interrupt.
You can avoid reading the Timer status register by attaching an ISR component
to Tc output of timer. And set up timer to just run continuously, no ISR.
Or eliminate the timer and use the M3 core systick to gen the ISR, save resources.
or use 2 pwms with slightly diffferent values of compare and period, and connect to a simple xor gate I think, use the output of the gate to drive the led.
it will look like its breathing.
yup just tested it, works 🙂 its one of the things that altera trys to get you to do for fpga's, so it works good on the psoc5lp too should work on 3 4 and 5lp