42.6.2.6 Automated Character Mapping

Displaying predefined character strings can be automated by using the Direct Memory Access (DMA). This is the Automated Character Mapping (ACM) feature. Compared to manual character mapping, there is one restriction for ACM: the first character is always mapped to the COM0 line.

The size of a character is defined by the CMCFG register; the mask of a character is defined by the CMDMASK register.

Several digits can be mapped on different rows and form a string (chain), which could be configured by the Auto Character Mapping Configuration (ACMCFG) register:

  • ACMCFG.NDROW defines number of digit per row.
  • ACMCFG.STSEG defines the index of the first SEG line of the first digit.
  • ACMCFG.NDIG defines the number character in the whole string.

If the three fields are configured correctly, ACM logic can infer each character in the string automatically. Each row should contain NDROW digits except the last row. Digits of next row should be aligned with the digits of the previous row (same SEG lines). The figure below gives an example for how to configure a string in ACM mode.

Figure 42-25. Examples of Digits Chains Mapped in Display Memory

After the user has enabled ACM by writing a '1' to the ACM Enable bit in the Control C register (CTRLC.ACMEN), the ACM logic (state machine) will start according to the configuration by user. Whenever the user writes a '0' to CTRLC.ACMEN, the ACM logic will return to its initial state.

The mapping method can be altered: The line index direction is selected by writing to the Decrement SEG Line Index bit in the Character Mapping Configuration register (CMCFG.DEC). Either the segment is starting from the bottom right (DEC=0) or from the bottom left (DEC=1).
Note: The Start SEG bits in the ACM Configuration register (ACMCFG.STSEG) have different coordinates under different CMCFG.DEC configurations.
Refer to the figure below for illustration.
Figure 42-26. DEC and Auto Character Mapping Order

There are two usage models available under ACM, defined by the Mode bit in the Automated Character Mapping Configuration register (ACMCFG.MODE): when MODE=0, the Sequential Characters String Display mode is selected. When MODE=1, the Scrolling of Characters String Display mode is selected.

Both modes use the character mapping configuration (see 42.6.2.5 Character Mapping) and require the digit to be mapped with contiguous SEG/COM lines in order to increment the index for the next digit automatically. For example when the first digit is mapped on SEG2 and SEG3 lines, the second digit must be mapped on SEG4 and SEG5 lines.

Sequential Characters String Display

This mode displays characters of a string on a digits chain on the LCD panel. The characters string is split in several sub strings, which are to be displayed sequentially at a selected frequency (frame counter basis). It requires an internal frame counter (time base) and the DMA controller to transfer the sub strings.

To use this mode, character mapping must be configured first (see 42.6.2.5 Character Mapping), then additional configuration must be done to specify the sequential display. In the Automated Character Mapping Configuration register (ACMCFG):

  • Write the size of the digits chain on LCD panel to the Number of Digit bits (ACMCFG.NDIG).
  • Write a '0' to the Mode bit in order to select the sequential mode (ACMCFG.MODE).
  • Configure a frame counter to set the display period (period between two sub strings display, see 42.6.2.1 Frame Counters), and write the frame counter index to the Frame Counter Selection bits (ACMCFG.FCS).

The DMA controller should be configured to transfer several blocks corresponding to the sub strings. Each block size is equal to the number of digit on the LCD panel (sub strings may require some blank characters in order to be displayed correctly). The number of blocks is the number of sub strings required to display the complete characters string. To repeat the complete character string display, the DMA controller should repeat the total blocks transfer. The DMA must write the blocks to the Character Mapping Segments Data register (CMDATA).

To enable the sequential characters string display, write a '1' to the Automated Character Mapping Enable bit in the Control B register (CTRLB.ACMEN); write a '0' to CTRLB.ACMEN to disable it.

The selected frame counter defines the number of frames before the SLCD triggers a new DMA block transfer. For example, if frame rate is 50Hz (20ms) in standard waveform mode, the characters string can be displayed with a period from 160ms up to 5.1s.

Figure 42-27. Sequential Character String Example (NDIG=5, frame rate=50Hz, FC0.OVF=31)

Scrolling of Characters String

This mode displays characters of a string on a digits chain on the LCD panel with a scrolling effect. For each step, a part of the characters string is displayed by shifting the string by one character in left direction. The period between each step can be configured on frame counter basis. This mode requires an internal frame counter (time base) and the DMA controller to transfer the character string.

To use this mode, character mapping must be configured first (see 42.6.2.5 Character Mapping), then additional configuration must be done to specify the scrolling display. In the Automated Character Mapping Configuration register (ACMCFG):

  • Write the size of the digits chain on the LCD panel to the Number of Digit bits (ACMCFG.NDIG).
  • Write the number of scrolling steps to the Steps bits (ACMCFG.STEPS). 
The number of steps is equal to string length - NDIG + 1.
  • Write a '1' to the Mode bit in order to to select the scrolling mode (ACMCFG.MODE).
  • Configure a frame counter to set the display period (period between two steps, see 42.6.2.1 Frame Counters) and write the frame counter index to the Frame Counter Selection bits (ACMCFG.FCS).

The DMA controller should be configured to transfer several times the same block corresponding to the complete characters string (the string may require some blank characters at the end in order to be displayed correctly). For a complete scrolling of the string, the number of DMA block transfers should be at least the number of steps. To repeat the complete character string scrolling, the DMA controller should repeat the blocks transfer. The DMA must write the blocks to the Character Mapping Segments Data register (CMDATA).

To enable the scrolling of characters string, write a '1' to the Automated Character Mapping Enable bit in the Control B register (CTRLB.ACMEN); write a '0' to CTRLB.ACMEN and to disable it.

The selected frame counter defines the number of frames before the SLCD triggers a new DMA block transfer, after each scrolling steps.

Figure 42-28. Characters String Scrolling Examples (NDIG=3)