Academic Program

CLC Setup

CLC Setup

The CLC peripheral has four sections that need to be set up before it can be used. This involves setting up eight registers in your software program. Once these registers are set up, the CLC will run independently of software control until the registers are changed via software.

They include:

  • CLCxCON
  • CLCxSEL0
  • CLCxSEL1
  • CLCxGLS0
  • CLCxGLS1
  • CLCxGLS2
  • CLCxGLS3
  • CLCxPOL

PIC® device can have multiple CLCs so each CLC module has its own set of eight registers. The x in the register names above represent the CLC number (e.g., CLC1 uses the CLC1CON register).

To simplify the setup, the CLC can be broken down into four sections that need to be configured. They include:

  • Inputs
  • Data Gating
  • Logic Function
  • Output Setting
clcsetup.png