CLCDesignerTool

The CLCDesignerTool V4 is a utility to aid in setting the Configurable Logic Cell (CLC) module configuration. It is a revamp of the original standalone V3.0.0.4 utility that includes new features and device support compared to previous versions.

New features include:

  • support for all PIC18F devices with CLC module(s) (also supports pic10/12/16 and pic24)
  • support for up to 8 CLC modules
  • CLCSELECT register overlay support
  • enhanced device ini file format with improved CLC and PPS input and output selections
  • BASIC or C output code generation
  • selectable output format to support different dialects of BASIC
  • improved file operations (Open, Save, Save As)
  • ability to load different device configuration files
  • new ViewCode window to preview output
  • improved output register settings display

CLCDesignerTool V4

Download CLCDesignerTool V4.0.0.0 (7z format)

To use, open the 7z file and copy the 'CLCDesignerTool' folder to a location of your choice. Be sure the folder has write access so that it can save any setup changes you make. Run the application CLCDesignerTool.exe. The program requires .NET V3.5 runtime support.

The basic program operation is similar to previous versions, and a description can be found in the CLC Configuration Tool Users Guide 41597B.pdf file.

New additions include:

File menu

  • Open - opens an existing CLC code file (BASIC or C)
  • Save/Save As - save current CLC code as specified in the 'Code Type' selector to a file
  • Config - load new device support .ini file
  • Exit - save current settings (device, code type, and output format) and exit

Device support is provided by the various CLCDesigner.ini Config files, which is broken up into multiple files to simplify usage:

  • CLCDesigner_pic10_12_16.ini
  • CLCDesigner_pic18.ini
  • CLCDesigner_pic24.ini
  • CLCDesigner.ini (all devices)

Format menu

  • select BASIC output code format options

This allows the output to be compatible with different dialects of BASIC, including Swordfish, PBP, Proton PDS, and GCB. The Format, Config, and device selections are saved in the CLCUser.ini file

Operation

Simply select the configuration file and device type from the dropdown list. This will setup the CLC (and any PPS selections) as appropriate. Select a CLC cell (1-8) and Logic Function type (AND-OR, OR-XOR, AND, etc) to begin.

As you change the MUX1-4 input selections, PPS assignments, and logic options the Register Settings display will change dynamically to show your selections. You can use 'Copy/Paste' buttons to copy one CLC settings to another, and preview the code output using 'View Code'. When you are done, simply highlight and copy the code from the ViewCode window, or generate an output file using 'File | Save/Save As'. If you generate an output file you can use 'File | Open' to reload the code later and make any changes as required.

Hints

The GATE1-GATE4 input MUX allows you to select an input, inverted input, or inverted GATE output. As you hover over a signal the cursor will change to a 'hand' to indicate when a choice may be selected. Likewise with the CLC output.

An input MUX with no connections will output a logic '0', so you may have to invert an unused mux output to produce a '1', depending on the logic that the gate feeds.

Here are some app notes with additional info for using the CLC modules:
Download CLC App notes (7z format)
Download CLC App notes2 (7z format)

Simulating CLC Operation Using DigitalWorks

Digital Works is a free design tool that enables you to construct digital logic circuits and to analyze their behaviour through simulation. It is written by David Barker and is available for download on the Mecanique web site https://www.mecanique.co.uk on the 'Free Software' page, or from the following link: https://www.mecanique.co.uk/software/digital-works.zip

After installing DigitalWorks, Download DigitalWorks CLC support files (7z format), and copy the CLC folder from the 7z file to the DigitalWorks PartCentre folder. This will place a CLC folder under the PartsCentre that contains macro files for each of the different CLC logic function configurations.

To use, simply select one of the CLC files from the PartsCentre. Circuit Inputs are shown using the Interactive Input control, and Circuit Outputs (and intermediary logic signals) use a green LED to monitor the logic state. Each CLC node that can be inverted contains a POL/INV block... to invert the node select the corresponding POL Interactive Input control for that signal.

Below is an example showing the clc_AND_OR macro:

In this simple example we have two inputs: MUX1_INA and MUX3_INA that have both been set high. We can see that the output of MUX1 is high, while MUX2 is low, producing a low on the output node of AND1. In the bottom portion (MUX3/MUX4), we have inverted the MUX4 output so that both MUX3 and MUX4 outputs are high, producing a high on node AND2 which results in CLCOUT high

The Interactive Inputs are useful for exploring the basic logic functions of a CLC module. You can create more sophisticated simulations by replacing them with the DigitalWorks Clock and Sequence Generators, and view the corresponding output waveforms using the Logic History window.

Rev History V4.0.0.0 (Sept 8 2021)

  • initial release