This application note describes the use of Core Independent Peripherals (CIP), how to use the Configurable Custom Logic (CCL) to filter inputs from different sensors, and how to create specific communication protocols using a Microchip AVR® device, a Passive InfraRed sensor (PIR), Ambient Light Sensor, and 16 addressable RGB LEDs. Many peripherals are configured to work together, independent of the CPU.
The light should turn ON only when it is sufficiently dark and there is movement in front of the PIR sensor. The implementation uses the AVR Configurable Custom Logic module to determine when this occurs. Updating the addressable RGB LEDs take advantage of timer/counter PWM generation, SPI, and CCL to generate the specific single-line serial protocol.
The Core Independent Nightlight demo uses the CCL module at its base. The system overview can be seen in the figure.