...the world's most energy friendly microcontrollers
2014-07-02 - Gecko Family - d0001_Rev1.30
464
www.silabs.com
29.3.9 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 29.11 (p. 464)
Table 29.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
(29.2)
The above equation shows how to set-up the LCD event frequency. In this example, the frame rate is
64Hz, and the LCD event frequency should be set-up to 2 seconds.
Example 29.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).
Summary of Contents for EFM32G
Page 505: ......