CLCxGLSn Registers

The CLCxLGSx Registers, contained in the Configurable Logic Cell (CLC), control the polarity of the selected CLC inputs.

CLC Data Gating

Outputs from the input multiplexers are directed to the desired logic function input through the data gating stage. Each data gate can direct any combination of four selected inputs. The gate can be configured to direct each input signal as inverted or non-inverted data. Directed signals are ORed together in each gate. The output of each gate can also be inverted before going on to the logic function stage but that is controlled by the CLCxPOL register.

The Data Gating section is controlled by one of four registers. Each gate has a separate register. Each input has an "N" bit and a "P" bit. Setting the "N" bit inverts the input and setting the "P" bit makes it non-inverted. If neither is set then the gate will be a constant logic level high or low depending on the output polarity setting in


CLCxGLS0 is shown below.


from PIC16F1507 Data Sheet.

Creating Various Gates

Each Data Gate is in essence a 1-to-4 input AND/NAND/OR/NOR gate depending on the invert/non-invert settings. When every input is inverted and the output is inverted, the gate is an NOR of all enabled data inputs. When the inputs and output are not inverted, the gate is an OR of all enabled inputs.
The table below summarizes the basic logic that can be obtained in a gate by using the gate logic select bits.


The table shows the logic of four input variables, but each gate can be configured to use less than four. If no inputs are selected, the output will be zero or one, depending on the gate output polarity bit. The output polarity is controlled by the CLCxPOL register.


20th Annual
Microchip MASTERs Conference 2016
Register now - Deadline: July 29

JW Marriott Desert Ridge Resort-Phoenix, AZ

© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.