43.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 43-25. Examples of Digits Chains Mapped in Display Memory
SEG
n
SEG
n
+ 1
SEG
n
+ 2
SEG
n
+ 3
SEG
n
+ 4
SEG
n
+ 5
Digit #0
Digit #1
SEG
n
+ 6
SEG
n
+ 7
SEG
n
+ 8
Digit #2
Digit #3
Digit #4
COM0
COM1
COM2
COM3
COM4
COM5
COM6
COM7
SEG
n
SEG
n
+ 1
SEG
n
+ 2
SEG
n
+ 3
SEG
n
+ 4
SEG
n
+ 5
Digit #0
Digit #1
SEG
n
+ 6
SEG
n
+ 7
SEG
n
+ 8
Digit #2
Digit #3
Digit #4
SEG
n
+ 9
SEG
n
+ 10
Row #0
Row #1
NSEG = 2
NCOM = 2
NDROW = 3
NDIG = 5
CMDMASK = FF40h
NSEG = 3
NCOM = 3
NDROW = 3
NDIG = 5
CMDMASK = FD88h
SEG
n
+ 11
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.
Atmel SAM L22G / L22J / L22N [DATASHEET]
Atmel-42402E-SAM L22G / L22J / L22N_Datasheet_Complete-07/2016
1081