User manual
...the world's most energy friendly microcontrollers
2012-04-24 - Giant Gecko Family - d0053_Rev0.96 791
www.energymicro.com
33.3.9 Direct Segment Control
It is possible to gain direct control over the bias levels for each SEG/COM line by setting DSC in
LCD_CTRL. The SEG lines bias levels can be set in SEGD0-SEGD2, while the COM line bias levels can
be set in SEGD3. To represent the different bias levels, 2-bits per SEG lines are needed. For example,
SEG0's bias levels can be set using SEGD0[1:0], and SEG1 can be controlled through SEGD[3:2] etc.
33.3.10 Frame Counter (FC)
The Frame Counter is synchronized to the LCD frame start and will generate an event after a
programmable number of frames. An FC event can trigger:
• LCD ready interrupt
• Blink (controlling the blink frequency)
• Next state in the Animation State Machine
• Data update if UDCTRL = 01
The Frame Counter is a down counter. It is enabled by writing FCEN in LCD_BACTRL. Optionally, the
Frame Counter can be prescaled so that the Frame Counter is decremented at:
• Every frame
• Every second frame
• Every fourth frame
• Every eight frame
This is controlled by the FCPRESC in LCD_BACTRL, see Table 33.11 (p. 791)
Table 33.11. FCPRESC
FCPRESC Mode Description General equation
00 Div1 CLK
FRAME
/1
01 Div2 CLK
FRAME
/2
10 Div4 CLK
FRAME
/4
11 Div8 CLK
FRAME
/8
CLK
FC
= CLK
FRAME
/2
FCPRESC
The top value for the Frame Counter is set by FCTOP in LCD_BACTRL. Every time the frame counter
reaches zero, it is reloaded with the top value, and at the same time an event, which can cause an
interrupt, data update, blink, or an animation state transition is triggered.
LCD Event Frequency Equation
CLK
EVENT
= CLK
FC
/(1 + FCTOP[5:0]) Hz (33.2)
The above equation shows how to set-up the LCD event frequency. In this example, the framerate is
64Hz, and the LCD event frequency should be set-up to 2 seconds.
Example 33.1. LCD Event Frequency Example
• Write FCPRESC to 3 => CLK
FC
= 8Hz (0.125 seconds)
• Write FCTOP to 15 => CLK
EVENT
= 0.5Hz (2 seconds)
If higher resolution is required, configure a lower prescaler value and increase the FCPRESC in
LCD_BACTRL accordingly (e.g. FCPRESC = 2, FCTOP = 31).