ModusToolbox™ SegLCD Configurator guide

About this document

Version

1.40

Scope and purpose

The SegLCD Configurator is used to generate display structures for the SegLCD Driver.

Intended audience

This document helps application developers understand how to use the SegLCD Configurator as part of creating a ModusToolbox™ application.

Document conventions

Convention

Explanation

Bold

Emphasizes heading levels, column headings, menus and sub-menus

Italics

Denotes file names and paths.

Courier New

Denotes APIs, functions, interrupt handlers, events, data types, error handlers, file/folder names,

directories, command line inputs, code snippets

File > New

Indicates that a cascading sub-menu opens when you select a menu item

Abbreviations and definitions

The following define the abbreviations and terms used in this document:

  • Application – One or more projects related to each other

  • Configurator – A GUI-based tool used to configure a resource

  • LCD – liquid crystal display

  • Glass – An LCD glass with one or more displays (for example, one 7-segment display and one bar-graph display).

  • Display – A block of symbols that have the same type on an LCD glass to indicate a multi-digital number or character string

  • Symbol – A block of pixels on an LCD glass to indicate a single digit or character.

  • Pixel – A basic displaying item; can be a segment of a 7-segment symbol (thus called a “segment”), a pixel of a dot-matrix display, or a stand-alone arbitrarily-shaped display element; each pixel has a unique set of common and segment lines within one LCD glass.

  • Common line (Com/COM for short) – A common wire/signal from the PSoC™ MCU to the LCD glass. In the SegLCD Configurator, this is represented as a column in the Mapping table.

  • Segment line (Seg/SEG for short) – A segment wire/signal from the PSoC™ MCU to the LCD glass represented as a row in the Mapping table.

Reference documents

Refer to the following documents for more information as needed:

1. Overview

The Segment LCD (SegLCD) Configurator is a stand-alone tool included with the ModusToolbox™ software and used to generate display structures for the SegLCD Driver. Section “Supported software” provides details on the PDL libraries. The tool is supported on Windows, Linux, and macOS.

image0

The SegLCD Configurator supports the following types of displays:

  • bar graph (1pixel per symbol)

  • 7-segment

  • 14-segment

  • 16-segment

  • 5x8 dot matrix (40 pixels per symbol)

See the Display Editor section for more information about display types.

1.1 Supported software

Name

Version

Link

PSoC™ 6 Peripheral Driver Library

1.3.1 and later

https://github.com/Infineon/psoc6pdl

MTB CAT1 Peripheral Driver Library

2.0.0 and later

https://github.com/Infineon/mtb-pdl-cat1

MTB CAT2 Peripheral Driver Library

1.3.0 and later

https://github.com/Infineon/mtb-pdl-cat2

2. Launch the SegLCD Configurator

There are several ways to launch the SegLCD Configurator, as described in this section. However, the best practice is to launch it using the Device Configurator to ensure that your application code remains in sync.

Note

The SegLCD Configurator requires the LCD Direct Drive resource, which you enable using the Device Configurator.

2.1 From the Device Configurator

  1. Open the Device Configurator using one of the methods described in the Device Configurator guide.

  2. On the Peripherals tab, enable the LCD Direct Drive resource if not already enabled.

  3. On the Parameters pane, click the Launch SegLCD Configurator button.

Note

You may be asked to save changes.

image1

After you have created SegLCD configuration for your application and used the Device Configurator to configure the Common and Segment signals, you can then use the SegLCD Configurator without the Device Configurator on subsequent updates.

Note

If you change the number of Common or Segment signals while using the SegLCD Configurator, then you must also use the Device Configurator again to reconfigure those signals.

2.2 make command

As described in the ModusToolbox™ user guide build system chapter, you can run numerous make commands in the application directory, such as launching the SegLCD Configurator. After you have created a ModusToolbox™ application, navigate to the application directory and type the following command in the appropriate bash terminal window:

make open CY_OPEN_TYPE=seglcd-configurator

This command opens the SegLCD Configurator GUI for the specific application in which you are working.

2.3 Eclipse IDE

If the selected application already includes a configuration (design.cyseglcd) file, you can launch the SegLCD Configurator from the Eclipse IDE. Right-click on the project in the Project Explorer and select ModusToolbox™

image2

If the selected application does not include a design.cyseglcd file, launch the SegLCD Configurator from theDevice Configurator.

2.4 Executable (GUI)

You can launch the SegLCD Configurator GUI by running its executable as appropriate for your operating system (for example, double-click it or select it using the Windows Start menu). By default, the configurator is installed here:

<install_dir>/ModusToolbox/tools_<version>/seglcd-configurator<version>

When launched this way, the SegLCD Configurator GUI opens with an untitled configuration file (*.cyseglcd). Save it as a new file and provide a file name, or open another existing *.cyseglcd file. See Menus for more information.

2.5 Executable (CLI)

The SegLCD Configurator executable can be run from the command line and it has a “cli” version of the executable as well. Running the executable from the command line can be useful as part of batch files or shell scripts to re-generate the source code based on the latest configuration settings. The exit code for the executable is zero if the operation is successful, or non-zero if the operation encounters an error. For more information about the command-line options, run the executable using the -h option.

3. Quick start

This section provides a simple workflow for how to use the SegLCD Configurator.

  1. Launch the SegLCD Configurator from the Device Configurator.

  2. On the SegLCD Configurator toolbar, click the Edit Displays image3 button to open the Display Editor dialog.

  3. On the Display Editor dialog toolbar, click the Add New Display button. In the new row, select the Type and specify the display Name and number of Symbols.

image4

  1. Close the dialog by clicking the X button or pressing [Esc].

  2. On the SegLCD Configurator toolbar, specify the number of Common and Segment LCD connections corresponding to the mapping table dimensions. See the Mapping table section for more information.

  3. On the Display view, left-click and hold a pixel of the symbol, drag it onto the mapping table below the Display view, and release the mouse button on the desired cell.

image5

  1. Repeat this process for all display pixels.

  2. Save the configuration and close the SegLCD Configurator.

Back on the Device Configurator, there are several tasks in the Notice List, which correlate to the number of Common and Segment signals you configured.

image6

  1. Double-click one of the task icons to jump to the Parameters pane for the corresponding connection parameter. Click the pull-down menu and select the appropriate signal.

image7

  1. Repeat the process for every task.

  2. When finished, save and close the Device Configurator; see Code generation.

4. Code generation

The Device Configurator displays information based on the design.modus file and various enabled personalities. When you open the SegLCD Configurator from the Device Configurator, information about the device and the application is passed to the SegLCD Configurator. When you save changes in the SegLCD Configurator, it updates/generates a design.cyseglcd configuration file in the same location as the design.modus file, and it passes information back to the Device Configurator.

Saving the configuration files generates code in the “GeneratedSource” subdirectory, which is located next to your configuration files. That subdirectory contains the source (.c) and header (.h) files with relevant firmware used by the SegLCD driver (refer to section Supported software).

5. GUI description

5.2 Toolbar

The toolbar provides the basic buttons from the Menus to create, open, edit, and save files

image8

Also, the toolbar contains buttons to configure and edit displays:

  • Edit Displays – Opens the Display Editor dialog.

  • Commons – Specifies the number of common LCD connections represented as columns on the mapping table.

  • Segments – Specifies the number of segment LCD connections represented as rows on the mapping table.

6. Display Editor

Use the Display Editor dialog to create and configure displays.

image9

You can open the Display Editor dialog using any of the following ways:

  • Click the Edit button on the menu

  • Click the Edit Displays button on the toolbar

You can close it multiple ways as well:

  • Click the X button

  • Keyboard shortcut applicable to the OS.

6.1 Display Editor toolbar

This dialog contains the following toolbar commands:

  • Add New Display – Adds a display row to the dialog and a tab to the Display view.

  • Delete Display – Deletes the selected display row from the dialog and removes the tab from the Display view.

  • Move Up / Down – Moves the selected display row up or down in the dialog, and accordingly rearranges the order of the tabs on the Display view.

6.2 Display row

Use the fields in the display row to enter the display Name, select the Type, and specify the number of Symbols. Use the [Tab] key to switch between the fields, as needed, or select the field using the mouse.

6.2.1 Name

Shows the names of configured displays: Display0, Display1, etc. Each name is unique. It may contain upper or lowercase letters, underscores, and digits. However, the first character cannot be a digit.

6.2.2 Type

Shows the types of displays to select from the pull-down menu:

  • Bar/Dial Graph – Consists of 2 or more pixels. The number of pixels (the bar graph length) is defined by the Symbols parameter. On the firmware layer, this type is considered as a non-symbolic display with one pixel per symbol. It supports up to 255 segments.

image10

  • 7-Segment Display – Consists of 7 segments per symbol.

image11

  • 14-Segment Display – Consists of 14 segments per symbol.

image12

  • 16-Segment Display – Consists of 16 segments per symbol.

image13

Note A decimal point/apostrophe/colon, or any other sign besides the segment display symbol, is not supported as a part of the symbol itself. These signs can be treated as stand-alone pixels.

  • Matrix Display – For a symbol sized 5 (width) x 8 (height) pixels.

image14

6.2.3 Symbols

The number of display types to include on the corresponding Display view tab.

7. Display view

The Display view contains one or more tabs that show display types configured in the Display Editor.

image15

A display symbol contains a set of pixels named A, B, C… (or 00, 01, 02 for the matrix display type) by default. The pixel names correspond to cell names in the mapping table (for a pixel placed on the mapping table). The pixels have colors showing the connectivity status:

  • Light Green – The pixel is connected, and the symbol is currently selected.

  • Dark Green – The pixel is connected, and the symbol is currently not selected.

  • Blue – The pixel is currently selected (connected or not).

  • White – The pixel is not connected, and the symbol is currently selected.

  • Grey – The pixel is not connected, and the symbol is not currently selected.

Note

The same colors are used for pixels in the mapping table, when applicable.

In this document, symbol segments for displays (for example, 7-segment, 14-segment, etc.), are called “pixels” so that they are not confused with segment LCD connections (physical wires) represented as rows of the mapping table (see Abbreviations and definitions).

8. Mapping table

The mapping table (below the Display view) is a grid control where columns represent Commons lines, rows represent Segments lines, and cells represent pixels. Each pixel is determined by a unique pair of common and segment lines.

image16

8.1 Connect/Disconnect display pixel

To connect a display pixel to a specific Common and Segment, drag a pixel from the Display view to the mapping table.

image17

You can also right-click on the cell to access the context menu and select the desired display, symbol, and pixel.

image18

To disconnect a display pixel, select a pixel in the table and drag the selected pixel outside the mapping table.

You can also simply press Delete.

8.2 Change pixel name

When a new file opens on the SegLCD GUI, all the cells in the mapping table are labelled as “Unused”.

If the user names an unconnected pixel from the mapping table, a define is added to the generated header file. For example,

#define <Peripheral instance name>_<User defined pixel name> (CY_SEGLCD_PIXEL( <Common number>UL, <Segment number>UL))

By default, display pixels connected to Commons and Segments in the mapping table have the following name format:

<display name>_<symbol number>_<pixel name>

To rename a pixel, double-click it in the mapping table to select it, and then replace the text. Each pixel name must be unique. The name can contain uppercase and lowercase letters, underscores, and digits. However, the first character cannot be a digit.

image19

Once the name has been changed, only the first two characters of the pixel name show in the display name.

To return a pixel name to its default value, delete the name and press [Enter].

9. Notice List**

The Notice List pane combines notices (errors, warnings, tasks, and notes) from many places in the configuration into a centralized list. If a notice shows a location, double-click the entry to show the error or warning.

image20

For more information, refer to the Device Configurator guide.

10. Known issues, limitations, and workarounds

There is a known GUI limitation that may be experienced by the user – disconnecting a pixel by simply dragging it outside the mapping table may lead to the case when the cursor movement is not fast enough and the event processing the movement may not be triggered, so the pixel will not disconnect.

To avoid this, do one of the following:

  • execute the procedure slowly

  • select the pixel and press the Delete button.

11. Version changes

This section lists and describes the changes for each version of this tool.

Version

Change descriptions

1.0

New tool.

1.1

Added the Undo / Redo feature.

1.20

Updated versioning to support patches.

Added Copy feature to the Notice List.

Changed unused pixels’ names from “PIX{№}” to “Unused” in the mapping table.

Fixed the colors in DarkMode.

Added the correct error location in the Notice List.

1.21

Updated versioning to support the updated backend.

1.30

Removed the command-line generate options: -g and –generate.

1.40

Updated the GUI by moving to Qt-5.15.2

Removed: the migration of configuration to the current XML format – configuration saved in the

comments in generated HEADER files (the old method).

Revision history

Revision

Date

Description

**

10/16/2019

New tool.

*A

11/25/2019

Resubmitted to address rejection.

*B

03/27/2020

Added the Undo/Redo feature.

*C

09/01/2020

1. Updated versioning to 1.20 to support patches. 2. Added Copy feature to the

Notice List. 3. Changed unused pixels’ names from “pix{&#8470;}” to “unused”

in the mapping table. 4. Fixed the colors in DarkMode. 5. Added the correct

error location in the Notice List.

*D

12/14/2020

Updated versioning to support the updated backend.

*E

03/11/2021

1.30 Removed the command-line generate options: -g and –generate.

*F

09/22/2021

Updated to version1.40.