43.6.2. Additional Features
43.6.2.1. Frame Counters
For several functions (e.g., blinking, or automated modes) a frame counter is required as time base.
There are three independent frame counters FC0, FC1 and FC2, which can be associated with any
function.
Each frame counter x is enabled by writing a '1' to the Frame Counter x Enable bit in the Control D
register (CTRLD.FCxEN), and disabled by writing a '0' to it. When disabling a frame counter, it will be
disabled once the CTRLD register is synchronized.
The frame counter is synchronized to the LCD frame start and generates an internal event each time the
counter overflows. The overflow value is selected by writing the Write Overflow bits in the Frame Counter
x register (FCx.OVF). The FCx register can only be written when the frame counter x is disabled
(CTRLD.FCxEN=0).
The frequency of the internal event is defined by the following formula:
f
FCx
=
FrameRate
FCx.OVF × 8 + 1
The prescaler of 8 can be bypassed by writing a '1' to the Prescaler Bypass bit in the FCx register
(FCx.PB):
f
FCx
= FrameRate
FCx.OVF + 1
43.6.2.2. Blank
To blank the LCD panel, write a '1' to the Blank bit in the Control D register (CTRLD.BLANK). All LCD
segments will be OFF at the beginning of next frame. The content of the display memory is not modified.
To output segment data normally, write a '0' to CTRLD.BLANK.
43.6.2.3. Blink
SLCD can be configured to blink all or selected LCD segments. Segments will alternate between on and
off state at the frequency given by the selected frame counter.
The blinking feature is configured in the Blink Configuration register (BCFG):
•
To blink all segments, write a '0' to the Mode bit in the BCFG register (BCFG.MODE). To blink only
selected segments, write a '1' to BCFG.MODE. Then, up to sixteen segments can be enabled
individually to blink, they are connected to SEG0, SEG1, and COM[0..7]:
•
To enable blinking for the segment connected to SEG0 and COMx, write a '1' to bit x of the
Blink Segment Selection 0 bit field in the BCFG register (BCFG.BSS0). Write a '0' to this bit to
disable blinking.
•
To enable blinking for the segment connected to SEG1 and COMy, write a '1' to bit y of the
Blink Segment Selection 1 bit field in the BCFG register (BCFG.BSS1). Write a '0' to this bit to
disable blinking.
A segment will blink only if it is already on - otherwise it will remain off.
•
The blink frequency is defined by the number of frames between each on/off state, as given by a
frame counter. Which frame counter is associated to the blink feature is selected by writing the
corresponding frame counter x index to the Frame Counter Selection bits in the BCFG register
(BCFG.FCS).
Once the desired blink configuration is written to the BCFG register, blinking is enabled by writing a '1' the
to Blink bit in Control C register (CTRLC.BLINK). Blinking is disabled by writing a '0' to CTRLC.BLINK.
Atmel SAM L22G / L22J / L22N [DATASHEET]
Atmel-42402E-SAM L22G / L22J / L22N_Datasheet_Complete-07/2016
1076