Character Mapping

This feature is used to write the display memory for the each character by giving the character start index, segment data, and mask value.

In this mode, multiple segments of the LCD panel can be gathered into digits in order to display as characters. Digits can be of various types (e.g., 7-segment, 16-segment) and mapped in the display memory accordingly. We can find the different memory mapping scenarios in the device datasheet. The SLCD supports displaying up to 24-segment characters on any existing LCD panel.

The user can change the mapping order by configuring the CMCFG.DEC bit to match the display memory mapping to their SLCD segment order.

The CMCFG.NSEG defines the number of segments used to map a single digit. It should be the number of SEG line - 1. In the figure below each digit requires four segment lines. So the value for NSEG = 3.

Figure 1. Segment LCD1 Xplained Pro Segments
Table 1. Segment LCD1 Xplained Pro Segments description
Segments COM0 COM1 COM2 COM3 Comments
SEG0 G1 G2 G4 G3 Atmel logo, four stage battery-, Dot-point-, usb-, and play indicator
SEG1 G0 G6 G7 G5
SEG2 E7 E5 E3 E1 Four stage wireless-, AM-, PM- Volt-, and millivolt indicator
SEG3 E6 E4 E2 E0
SEG4 A0-h A0-i A0-k A0-n 1st 14-segment character
SEG5 B3 A0-f A0-e A0-d
SEG6 A0-a A0-b A0-c B4
SEG7 A0-g A0-j A0-l A0-m
SEG8 A1-h A1-i A1-k A1-n 2nd 14-segment character
SEG9 B2 A1-f A1-e A1-d
SEG10 A1-a A1-b A1-c B5
SEG11 A1-g A1-j A1-l A1-m
SEG12 A2-h A2-i A2-k A2-n 3rd 14-segment character
SEG13 B1 A2-f A2-e A2-d
SEG14 A2-a A2-b A2-c B6
SEG15 A2-g A2-j A2-l A2-m
SEG16 A3-h A3-i A3-k A3-n 4th 14-segment character
SEG17 B0 A3-f A3-e A3-d
SEG18 A3-a A3-b A3-c B7
SEG19 A3-g A3-j A3-l A3-m
SEG20 A4-h A4-i A4-k A4-n 5th 14-segment character. Celsius and Fahrenheit indicator.
SEG21 B8 A4-f A4-e A4-d
SEG22 A4-a A4-b A4-c B9
SEG23 A4-g A4-j A4-l A4-m

In the figure above the Segment LCD1 Xplained Pro LCD requires four segment lines and four com lines in each digit (14 segment per character). Icons starts from seg0 and alphanumeric digit starts from segment 4/8/12/16/20. When we match the segment mapping with display memory mapping, we can get the mapping order as shown in Figure 2.

In this mode to write the character value in the segment memory register, the CMDATA register is used. Since the CMDATA register can be up to 24 bits, a mask can be configured to write only selected bits. Based on the user SLCD glass an unwanted bit can be masked by writing a '1' to a bit in the Character Mapping Data Mask register (CMDMASK). Then this bit will not be written in the display memory when CMDATA register is written.

Figure 2. Example Character Mapping for Segment LCD1 Xplained Pro
SEG4 A0-h A0-i A0-k A0-n 1st 14-segment character
SEG5 B3 A0-f A0-e A0-d
SEG6 A0-a A0-b A0-c B4
SEG7 A0-g A0-j A0-l A0-m