CE203303 - PSoC® 3 and PSoC 5LP Breathing LED | Cypress Semiconductor
CE203303 - PSoC® 3 and PSoC 5LP Breathing LED
This code example demonstrates the flexibility of a PSoC® 3 or PSoC 5LP, by implementing a breathing LED effect exclusively in hardware, with no CPU usage beyond initialization. The design uses two PWMs and an XOR gate to make an LED gradually cycle through increasing and decreasing brightness. The PWMs have slightly different periods, with 50% duty cycles. The rate of change in LED brightness is proportional to the difference between the PWM output frequencies.