The Configurable Custom Logic (CCL) is a programmable logic peripheral which can be connected to the device pins, to events, or to other internal peripherals. This allows the user to eliminate logic gates for simple glue logic functions on the PCB and logic operations can be performed using Programmable Lookup Tables (LUT) and sequential logic without CPU intervention.
Each LUT consists of three individually configurable inputs and a truth table, in addition to the optional filter, synchronizer, and edge detector. Inputs can either be I/O pins, internal feedback, peripherals, or events from the Event System. Each LUT can generate an output as a user programmable logic expression from the three inputs. Two adjacent LUTs are connected to a sequential logic block, forming a unit. The optional sequential logic can be enabled for complex waveform generation such as JK flip-flop, RS latch, D latch, or gated D flip-flop. The output can be routed to I/O pins, peripherals, event system, or as feedback to the corresponding unit.
CCL Configurator supports end-to-end configuration of the CCL module graphically.
The following application demonstrates the use of internal peripherals and I/O pins as inputs to the CCL. The CCL uses the LUTs and sequential modules to generate the output based on the inputs. The example application below detects motion in low-light condition and provides the output signal to a pin. The signal will be available in that pin until a switch is pressed to turn off the signal.