You are here

CE97634 - PSoC® 4 Breathing LED | Cypress Semiconductor

CE97634 - PSoC® 4 Breathing LED

Last Updated: 
Jul 05, 2017
Version: 
*C

This code example demonstrates the flexibility of a PSoC® 4, 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.

CE97634 - PSoC® 4 Breathing LED