42.6.2.5 Character Mapping

Multiple segments of the LCD panel can be gathered to digits in order to display characters. Digits can be of various type (e.g., 7-segment, 16-segment) and mapped in the display memory differently, refer to the figure below for examples. The SLCD supports displaying up to 24-segment characters on any existing LCD panel.

Figure 42-21. Examples of Digit Mapped in Display Memory

Several digits can be mapped in display memory to form a digits chain, which is used to display a characters string. Once configured, the user updates a digit by providing up to 24 bits with a single write access. ASCII tables provide standard symbols which should be handled by software before being displayed.

Each character is a continuous display area with its SEG axis defined by the Character Mapping Configuration register (CMCFG.NSEG). The maximum size is 24. Refer also to the example figure below.

Figure 42-22. Character Mapping Example

The 24 segments value is updated by a write access to the Character Mapping Segments Data register (CMDATA).

Since the CMDATA register can be up to 24 bits whereas a digit can consist of less than 24 segments, a mask can be configured to write only selected bits: Writing a '1' to a bit in the Character Mapping Data Mask register (CMDMASK) will mask the corresponding bit in the CMDATA register. This bit will not be written in display memory when CMDATA register is written. Write a '0' to a bit of CMDMASK to disable the mask for that bit. The corresponding bit in CMDATA will be written to display memory.

CMDATA is not written to the display memory in one shot, but in a serial way. Serialization takes 24 APB cycles. The user can check the status of the serial writing by reading the Character Mapping Write Busy bit in the Status register (STATUS.CMWRBUSY). Any write access to the display memory through CMDATA/SDATA/ISDATA will be ignored when STATUS.CMWRBUSY is high. Therefore, user must not write to CMDATA while STATUS.CMWRBUSY is asserted.

The coordinate of a character is defined by Character Mapping Index (CMINDEX) register.

The expected usage model for character mapping is shown below:

Figure 42-23. Usage Model for Character Mapping Function

By this character mapping feature, user could update any particular rectangular window defined by CMCFG and CMINDEX in the display memory just by a single APB write access.

The Decrement SEG Index bit in Character Mapping Configuration (CMCFG.DEC) defines the mapping order. And CMINDEX.SINDEX also have different coordinate under different DEC configuration. Refer to figure below for illustration.

Figure 42-24. Character Mapping Order
Note: The user must make sure all character bits could be mapped to some bit in display memory, not somewhere out side display memory.