We detect you are using an unsupported browser. For the best experience, please visit the site using Chrome, Firefox, Safari, or Edge. X

Custom Logic on PIC® and AVR® Microcontrollers


What Is a CCL or CLC?

Through logic gates, systems can make decisions based on criteria without Central Processing Unit (CPU) intervention.  Traditionally, these logic gates are manually implemented as external components, however AVR® and PIC® microcontrollers (MCUs) offer this as a built-in functionality to save cost and application space.

The on-chip Configurable Logic Cell (CLC) peripheral on PIC MCUs and Configurable Custom Logic (CCL) peripheral on AVR MCUs eliminates the need for external components and complicated design work. With these on-chip peripherals, you can apply customized logic without physically expanding your application’s size.

If your design changes during the development process, your logic can be easily reconfigured with MPLAB Code Configurator or Atmel START.

How Can Your Design Benefit From the CCL and CLC?


With custom logic peripherals, you can apply combinatorial and sequential logic to both internal and external signals. This bypasses the CPU through hardware-based logic, and also automates task handling within your system.

How Are They Used?


Configurable Logic Cell on PIC MCUs

The CLC has a variety of basic gates as well as sequential logic options that can be customized to create the logic specific to your application. Through these logic gates, the CLC gives you the ability to combine signals to make a new custom signal without running code to execute it. This peripheral can also be used for routing pins on the MCU. For instance, you can easily configure the CLC peripheral to route the incoming RX signal of a connected Bluetooth® module to the virtual TX pin of your development board.

Configurable Custom Logic on AVR MCUs


The CCL on AVR MCUs can function as a simple logic gate, flip flop, delay element, filter or latch. You can also build your own custom gates through the lookup table. The lookup table behaves like a programmable truth table and features the ability to set the output of your gate based on entered values or an entered expression such as (!a * b + c). The results of the CCL can be used to trigger other peripherals as well without any CPU intervention.

Application Notes


Title Download
AN2912 - Using CLCs in Real-Time Applications Download
AN2522 - Core Independent Brushless DC Fan Control Using CCL AVR Microcontrollers Download
TB3218 - Getting started with CCL Download
AN1606 - Using the Configurable Logic Cell (CLC) to Interface a PIC16F1509 and WS2811 LED Driver Download
AN2387 - Core Independent Nightlight Using Configurable Custom Logic on ATtiny1617 Download
TB3133 - Configurable Logic Cell on PIC Microcontrollers Download
AN2133 - Extending PIC MCU Capabilities Using CLC Download

8-bit Microcontrollers with Configurable Logic Cell (CLC)

View All Parametrics
Product Pin Count Program Memory Size (KWords) Configurable Logic Cell Modules (CLC /CCL) Configurable Logic Cell Modules (CLC /CCL) Type
ATMEGA1608 32 8 1 CCL
ATMEGA1609 48 8 1 CCL
ATMEGA3208 32 16 1 CCL
ATMEGA3209 48 16 1 CCL
ATMEGA4808 32 24 1 CCL
ATMEGA4809 48 24 1 CCL
ATMEGA808 32 4 1 CCL
ATMEGA809 48 4 1 CCL
ATTINY1604 14 8 1 CCL
ATTINY1606 20 8 1 CCL
ATTINY1607 24 8 1 CCL
ATTINY1614 14 8 1 CCL
ATTINY1616 20 8 1 CCL
ATTINY1617 24 8 1 CCL
ATTINY1624 14 8 1 CCL
ATTINY1626 20 8 1 CCL
ATTINY1627 24 8 1 CCL
ATTINY202 8 1 1 CCL
ATTINY204 14 1 1 CCL
ATTINY212 8 1 1 CCL
ATTINY214 14 1 1 CCL
ATTINY3216 20 16 1 CCL
ATTINY3217 24 16 1 CCL
ATTINY402 8 2 1 CCL
ATTINY404 14 2 1 CCL
ATTINY406 20 2 1 CCL
ATTINY412 8 2 1 CCL
ATTINY414 14 2 1 CCL
ATTINY416 20 2 1 CCL
ATTINY417 24 2 1
ATTINY804 14 4 1 CCL
ATTINY806 20 4 1 CCL
ATTINY807 24 4 1 CCL
ATTINY814 14 4 1 CCL
ATTINY816 20 4 1 CCL
ATTINY817 24 4 1 CCL
AVR128DA28 28 32 1 CCL
AVR128DA32 32 64 1 CCL
AVR128DA48 48 64 1 CCL
AVR128DA64 64 64 1 CCL
AVR128DB28 28 64 1 CCL
AVR128DB32 32 64 1 CCL
AVR128DB48 48 64 1 CCL
AVR128DB64 64 64 1 CCL
AVR32DA28 28 16 1 CCL
AVR32DA32 32 16 1 CCL
AVR32DA48 48 16 1 CCL
AVR64DA28 28 32 1 CCL
AVR64DA32 32 32 1 CCL
AVR64DA48 48 32 1 CCL
AVR64DA64 64 32 1 CCL
PIC16F15313 8 2 4 CLC
PIC16F15323 14 2 4 CLC
PIC16F15324 14 4 4 CLC
PIC16F15325 14 8 4 CLC
PIC16F15344 20 4 4 CLC
PIC16F15345 20 8 4 CLC
PIC16F15354 28 4 4 CLC
PIC16F15355 28 8 4 CLC
PIC16F15356 28 16 4 CLC
PIC16F15375 40 8 4 CLC
PIC16F15376 40 16 4 CLC
PIC16F15385 48 8 4 CLC
PIC16F15386 48 16 4 CLC
PIC16F18313 8 2 2
PIC16F18323 14 2 2
PIC16F18324 14 4 4
PIC16F18325 14 8 4
PIC16F18326 14 16 4
PIC16F18344 20 4 4
PIC16F18345 20 8 4
PIC16F18346 20 16 4 CLC
PIC16F18424 14 4 4
PIC16F18425 14 8 4
PIC16F18426 14 16 4 CLC
PIC16F18444 20 4 4
PIC16F18445 20 8 4 CLC
PIC16F18446 20 16 4 CLC
PIC16F18455 28 8 4 CLC
PIC16F18456 28 16 4
PIC16F18854 28 4 4
PIC16F18855 28 8 4
PIC16F18856 28 16 4
PIC16F18857 28 32 4
PIC16F18875 40 8 4
PIC16F18876 40 16 4
PIC16F18877 40 32 4
PIC16F19155 28 8 4
PIC16F19156 28 16 4
PIC16F19175 40 8 4
PIC16F19176 40 16 4
PIC16F19185 48 8 4
PIC16F19186 48 16 4
PIC16F19195 64 8 4
PIC16F19196 64 16 4
PIC16F19197 64 32 4
PIC18F04Q40 14 8 4 CLC
PIC18F04Q41 14 8 4 CLC
PIC18F05Q40 14 16 4 CLC
PIC18F05Q41 14 16 4 CLC
PIC18F06Q40 14 32 4 CLC
PIC18F06Q41 14 32 4 CLC
PIC18F14Q40 20 8 4 CLC
PIC18F14Q41 20 8 4 CLC
PIC18F15Q40 20 64 4 CLC
PIC18F15Q41 20 16 4 CLC
PIC18F16Q40 20 32 4 CLC
PIC18F16Q41 20 32 4 CLC
PIC18F24K42 28 8 4 CLC
PIC18F25K42 28 16 4 CLC
PIC18F25K83 28 16 4 CLC
PIC18F25Q43 28 16 8 CLC
PIC18F26K42 28 32 4 CLC
PIC18F26K83 28 32 4 CLC
PIC18F26Q10 28 32 8 CLC
PIC18F26Q43 28 32 8 CLC
PIC18F26Q83 28 32 8 CLC
PIC18F26Q84 28 32 8 CLC
PIC18F27K42 28 64 4 CLC
PIC18F27Q10 28 64 8 CLC
PIC18F27Q43 28 64 8 CLC
PIC18F27Q83 28 64 8 CLC
PIC18F27Q84 28 64 8 CLC
PIC18F45K42 40 16 4 CLC
PIC18F45Q10 40 16 8 CLC
PIC18F45Q43 40 16 8 CLC
PIC18F46K42 40 32 4 CLC
PIC18F46Q10 40 32 8 CLC
PIC18F46Q43 40 32 8 CLC
PIC18F46Q83 40 32 8 CLC
PIC18F46Q84 40 32 8 CLC
PIC18F47K42 40 64 4 CLC
PIC18F47Q10 40 64 8 CLC
PIC18F47Q43 40 64 8 CLC
PIC18F47Q83 40 64 8 CLC
PIC18F47Q84 40 64 8 CLC
PIC18F55K42 48 16 4 CLC
PIC18F55Q43 48 16 8 CLC
PIC18F56Q43 48 32 8 CLC
PIC18F56Q83 48 32 8 CLC
PIC18F56Q84 48 32 8 CLC
PIC18F57Q43 48 64 8 CLC
PIC18F57Q83 48 64 8 CLC
PIC18F57Q84 48 64 8 CLC