42.6.2.4 Autonomous Segment Animation

Up to sixteen segments can be animated by an internal circular shift register. Up to sixteen states are then defined, e.g. to make a running wheel. The size of the animation can be configured by writing the number of segments to use to the Size bits in the Circular Shift Register Configuration register (CSRCFG.SIZE).

The circular shift register bits are associated to segments connected to SEG2, SEG3 and COM[0..7] lines, refer to the table below.

Table 42-8. Circular Shift Register Bit Mapping
Circular Shift Register Bit COM SEG
0 0 2
1 0 3
2 1 2
3 1 3
4 2 2
5 2 3
6 3 2
7 3 3
8 4 2
9 4 3
10 5 2
11 5 3
12 6 2
13 6 3
14 7 2
15 7 3

The shifting frequency is configured in a frame counter as a number of frames. A frame counter is associated to this feature by writing the corresponding index to the Frame Counter Selection bits in the CSRCFG register (CSRCFG.FCS).

The shift direction is selected by writing to the Direction bit in CSRCFG register (CSRCFG.DIR): DIR=0 is shifting to the left; DIR=1 will shift to the right.

The initial value of the circular shift register must be written to the Data bits in the CSRCFG register (CSRCFG.DATA).

Once the circular shift register is configured, autonomous segment animation is enabled by writing a '1' to the Circular Shift Register Enable bit in the Control C register (CTRLC.CSREN). Animation is disabled by writing a '0' to CTRLC.CSREN. The initial value is shifted each time the selected frame counter overflows.

The CSRCFG register cannot be written when circular shift register is enabled. The shifting frequency can be modified, provided selected frame counter has been disabled first.

Figure 42-20. LCD Wheel Animation Example (8 Segments)