16. Liquid crystal display controller (LCD)

16.1 Introduction

The LCD controller is a digital controller/driver for monochrome passive liquid crystal display (LCD) with up to 8 common terminals and up to 44 segment terminals to drive 176 (44x4) or 320 (40x8) LCD picture elements (pixels). The exact number of terminals depends on the device pinout, as described in the datasheet.

The LCD is made up of several segments (pixels or complete symbols), which can be turned visible or invisible. Each segment consists of a layer of liquid crystal molecules aligned between two electrodes. When a voltage greater than a threshold is applied across the liquid crystal, the segment becomes visible. The segment voltage must be alternated to avoid an electrophoresis effect in the liquid crystal, which degrades the display. The waveform across a segment must then be generated to avoid having a direct current (DC).

16.2 LCD main features

Note: When the LCD relies on the internal step-up converter, the \( V_{LCD} \) pin should be connected to \( V_{SS} \) with a capacitor. Its typical value is 1 \( \mu F \) (see \( C_{EXT} \) value in the product datasheets for further information).

The \( V_{LCD} \) pin should be connected to \( V_{DDA} \) for devices without LCD, and if the peripheral is not used for devices with LCD.

16.3 Glossary

Bias: Number of voltage levels used when driving an LCD. It is defined as \( 1/(\text{number of voltage levels used to drive an LCD display} - 1) \) .

Boost circuit: Contrast controller circuit

Common: Electrical connection terminal connected to several segments (44 segments).

Duty ratio: Number defined as \( 1/(\text{number of common terminals on a given LCD display}) \) .

Frame: One period of the waveform written to a segment.

Frame rate: Number of frames per second, that is the number of times the LCD segments are energized per second.

LCD: (liquid crystal display) a passive display panel with terminals leading directly to a segment.

Segment: The smallest viewing element (a single bar or dot that is used to help create a character on an LCD display).

16.4 LCD functional description

16.4.1 General description

The LCD controller has five main blocks (see Figure 72):

Figure 72. LCD controller block diagram

Figure 72. LCD controller block diagram. The diagram shows the internal architecture of the LCD controller. On the left, an 'Address bus' and 'Data bus' are shown. The 'Data bus' connects to 'LCD regs', 'LCD RAM (32x16 bits)', and another 'LCD regs' block. The 'LCD RAM' output goes to an '8-to-1 mux', which then connects to a 'SEG driver'. The 'SEG driver' output (44 bits, SEG[43:0]) goes to an 'Analog switch array'. The 'Analog switch array' has outputs for COM0 through COM3, SEG0 through SEG39, and SEG40/COM4 through SEG43/COM7. Above the 'LCD RAM', a 'Frequency generator' block contains a '16-bit prescaler' (input LCDCLK, output LCDCLK/32768), a 'CLOCK MUX' (inputs LCDCLK and PS[3:0] from 'LCD regs'), and a 'Divide by 16 to 31' block (input DIV[3:0] from 'LCD regs'). The 'CLOCK MUX' output is ck_ps, which goes to the 'Divide by 16 to 31' block. The 'Divide by 16 to 31' output is ck_div, which goes to the 'COM driver'. The 'COM driver' has an 'Interrupt' output and a COM[3:0] output to the 'Analog switch array'. Below the 'LCD RAM', another 'LCD regs' block provides 'STATIC', 'VSEL', 'EN', 'HD', 'BIAS[1:0]', and 'CCI[2:0]' signals. The 'HD' signal goes to a 'Pulse generator', which then goes to the 'Voltage generator'. The 'Voltage generator' and 'Contrast controller' are part of an 'Analog stepup converter'. The 'Voltage generator' outputs Vss, 1/3-1/4 Vcp, 2/3 -3/4 Vcp, 1/2 Vcp, and Vcp to the 'Analog switch array'. The 'Contrast controller' outputs a 'READY' signal to the 'SEG driver'. A 'SEG COM MUX' block receives 'SEG[43:40]' (44 bits) and 'SEG[31:28]' (40 bits) from the 'SEG driver' and outputs 'SEG[43:40]' to the 'Analog switch array'. The 'Analog switch array' also has 'I/O ports' and is labeled 'MS33437V1'.
Figure 72. LCD controller block diagram. The diagram shows the internal architecture of the LCD controller. On the left, an 'Address bus' and 'Data bus' are shown. The 'Data bus' connects to 'LCD regs', 'LCD RAM (32x16 bits)', and another 'LCD regs' block. The 'LCD RAM' output goes to an '8-to-1 mux', which then connects to a 'SEG driver'. The 'SEG driver' output (44 bits, SEG[43:0]) goes to an 'Analog switch array'. The 'Analog switch array' has outputs for COM0 through COM3, SEG0 through SEG39, and SEG40/COM4 through SEG43/COM7. Above the 'LCD RAM', a 'Frequency generator' block contains a '16-bit prescaler' (input LCDCLK, output LCDCLK/32768), a 'CLOCK MUX' (inputs LCDCLK and PS[3:0] from 'LCD regs'), and a 'Divide by 16 to 31' block (input DIV[3:0] from 'LCD regs'). The 'CLOCK MUX' output is ck_ps, which goes to the 'Divide by 16 to 31' block. The 'Divide by 16 to 31' output is ck_div, which goes to the 'COM driver'. The 'COM driver' has an 'Interrupt' output and a COM[3:0] output to the 'Analog switch array'. Below the 'LCD RAM', another 'LCD regs' block provides 'STATIC', 'VSEL', 'EN', 'HD', 'BIAS[1:0]', and 'CCI[2:0]' signals. The 'HD' signal goes to a 'Pulse generator', which then goes to the 'Voltage generator'. The 'Voltage generator' and 'Contrast controller' are part of an 'Analog stepup converter'. The 'Voltage generator' outputs Vss, 1/3-1/4 Vcp, 2/3 -3/4 Vcp, 1/2 Vcp, and Vcp to the 'Analog switch array'. The 'Contrast controller' outputs a 'READY' signal to the 'SEG driver'. A 'SEG COM MUX' block receives 'SEG[43:40]' (44 bits) and 'SEG[31:28]' (40 bits) from the 'SEG driver' and outputs 'SEG[43:40]' to the 'Analog switch array'. The 'Analog switch array' also has 'I/O ports' and is labeled 'MS33437V1'.

Note: LCDCLK is the same as RTCCLK. Refer to the RTC/LCD clock description in the RCC section of this manual.

16.4.2 Frequency generator

The frequency generator allows you to achieve various LCD frame rates starting from an LCD input clock frequency (LCDCLK) which can vary from 32 kHz up to 1 MHz.

3 different clock sources can be used to provide the LCD clock (LCDCLK/RTCCLK):

Refer to the RTC/LCD Clock configuration in the RCC section of this manual.

This clock source must be stable in order to obtain accurate LCD timing and hence minimize DC voltage offset across LCD segments. The input clock LCDCLK can be divided by any value from 1 to \( 2^{15} \times 31 \) (see Section 16.5.2 ). The frequency generator consists of a prescaler (16-bit ripple counter) and a 16 to 31 clock divider. The PS[3:0] bits, in the LCD_FCR register, select LCDCLK divided by \( 2^{\text{PS}[3:0]} \) . If a finer resolution rate is required, the DIV[3:0] bits, in the LCD_FCR register, can be used to divide the clock further by 16 to 31. In this way you can roughly scale the frequency, and then fine-tune it by linearly scaling the clock with the counter. The output of the frequency generator block is \( f_{\text{ck\_div}} \) , which constitutes the time base for the entire LCD controller. The \( f_{\text{ck\_div}} \) frequency is equivalent to the LCD phase frequency, rather than the frame frequency (they are equal only in case of static duty). The frame frequency ( \( f_{\text{frame}} \) ) is obtained from \( f_{\text{ck\_div}} \) by dividing it by the number of active common terminals (or by multiplying it for the duty). Thus the relation between the input clock frequency ( \( f_{\text{LCDCLK}} \) ) of the frequency generator and its output clock frequency \( f_{\text{ck\_div}} \) is:

\[ f_{\text{ckdiv}} = \frac{f_{\text{LCDCLK}}}{2^{\text{PS}} \times (16 + \text{DIV})} \]

\[ f_{\text{frame}} = f_{\text{ckdiv}} \times \text{duty} \]

This makes the frequency generator very flexible. An example of frame rate calculation is shown in Table 74 .

Table 74. Example of frame rate calculation

LCDCLKPS[3:0]DIV[3:0]RatioDuty\( f_{\text{frame}} \)
32.768 kHz311361/830.12 Hz
32.768 kHz412721/430.12 Hz
32.768 kHz463521/331.03 Hz
32.768 kHz515441/230.12 Hz
32.768 kHz611088static30.12 Hz
32.768 kHz14401/8102.40 Hz
32.768 kHz24801/4102.40 Hz
32.768 kHz2111081/3101.14 Hz
32.768 kHz341601/2102.40 Hz
32.768 kHz44320static102.40 Hz

Table 74. Example of frame rate calculation (continued)

LCDCLKPS[3:0]DIV[3:0]RatioDutyf frame
1.00 MHz6312161/8102.80 Hz
1.00 MHz7324321/4102.80 Hz
1.00 MHz71033281/3100.16 Hz
1.00 MHz8348641/2102.80 Hz
1.00 MHz939728static102.80 Hz

The frame frequency must be selected to be within a range of around ~30 Hz to ~100 Hz and is a compromise between power consumption and the acceptable refresh rate. In addition, a dedicated blink prescaler selects the blink frequency. This frequency is defined as \( f_{\text{BLINK}} = f_{\text{ck\_div}}/2^{(\text{BLINKF} + 3)} \) , with BLINKF[2:0] = 0, 1, 2, ..., 7.

The blink frequency achieved is in the range of 0.5 Hz, 1 Hz, 2 Hz or 4 Hz.

16.4.3 Common driver

Common signals are generated by the common driver block (see Figure 72).

COM signal bias

Each COM signal has identical waveforms, but different phases. It has its max amplitude \( V_{\text{LCD}} \) or \( V_{\text{SS}} \) only in the corresponding phase of a frame cycle, while during the other phases, the signal amplitude is:

Selection between 1/2, 1/3 and 1/4 bias mode can be done through the BIAS bits in the LCD_CR register.

A pixel is activated when both of its corresponding common and segment lines have max amplitudes during the same phase. Common signals are phase inverted in order to reduce EMI. As shown in Figure 73, with phase inversion, there is a mean voltage of 1/2 \( V_{\text{LCD}} \) at the end of every odd cycle.

Figure 73. 1/3 bias, 1/4 duty

Timing diagram for 1/3 bias, 1/4 duty. It shows Common and Segment signal levels over two frames (Odd and Even) across four phases (0, 1, 2, 3). The Common signal levels are V_LCD, 2/3 V_LCD, 1/3 V_LCD, and V_SS. The Segment signal levels are V_LCD, 2/3 V_LCD, 1/3 V_LCD, and V_SS. The diagram illustrates the phase inversion and the resulting mean voltage of 1/2 V_LCD at the end of every odd cycle.

The diagram shows the timing for Common (COM) and Segment (SEG) signals over two frames: Odd frame and Even frame. Each frame consists of four phases: Phase 0, Phase 1, Phase 2, and Phase 3. The Common signal levels are \( V_{\text{LCD}} \) , \( 2/3 V_{\text{LCD}} \) , \( 1/3 V_{\text{LCD}} \) , and \( V_{\text{SS}} \) . The Segment signal levels are \( V_{\text{LCD}} \) , \( 2/3 V_{\text{LCD}} \) , \( 1/3 V_{\text{LCD}} \) , and \( V_{\text{SS}} \) . The diagram shows the phase inversion and the resulting mean voltage of \( 1/2 V_{\text{LCD}} \) at the end of every odd cycle. The signal levels are as follows:

SignalPhaseOdd frameEven frame
Common0\( V_{\text{LCD}} \)\( V_{\text{SS}} \)
1\( 2/3 V_{\text{LCD}} \)\( 1/3 V_{\text{LCD}} \)
2\( 1/3 V_{\text{LCD}} \)\( 2/3 V_{\text{LCD}} \)
3\( V_{\text{SS}} \)\( V_{\text{LCD}} \)
Segment0\( V_{\text{LCD}} \)\( V_{\text{SS}} \)
1\( 2/3 V_{\text{LCD}} \)\( 1/3 V_{\text{LCD}} \)
2\( 1/3 V_{\text{LCD}} \)\( 2/3 V_{\text{LCD}} \)
3\( V_{\text{SS}} \)\( V_{\text{LCD}} \)

The diagram also indicates the active state of the signals: Com active, Com inactive, and Com inactive. The signal levels are as follows:

SignalPhaseOdd frameEven frame
Common0Com activeCom inactive
1Com inactiveCom active
2Com inactiveCom active
3Com inactiveCom active
Segment0Com activeCom inactive
1Com activeCom inactive
2Com inactiveCom active
3Com inactiveCom active
Timing diagram for 1/3 bias, 1/4 duty. It shows Common and Segment signal levels over two frames (Odd and Even) across four phases (0, 1, 2, 3). The Common signal levels are V_LCD, 2/3 V_LCD, 1/3 V_LCD, and V_SS. The Segment signal levels are V_LCD, 2/3 V_LCD, 1/3 V_LCD, and V_SS. The diagram illustrates the phase inversion and the resulting mean voltage of 1/2 V_LCD at the end of every odd cycle.

In case of 1/2 bias (BIAS = 01) the \( V_{LCD} \) pin generates an intermediate voltage on \( V_{LCDrail2} \) equal to \( 1/2 V_{LCD} \) for odd and even frames (see Figure 80).

COM signal duty

Depending on the DUTY[2:0] bits in the LCD_CR register, the COM signals are generated with static duty (see Figure 75), 1/2 duty (see Figure 76), 1/3 duty (see Figure 77), 1/4 duty (see Figure 78) or 1/8 duty (see Figure 79).

COM[n] n[0 to 7] is active during phase n in the odd frame, so the COM pin is driven to \( V_{LCD} \) .

During phase n of the even frame the COM pin is driven to \( V_{SS} \) .

In the case of 1/3 or 1/4) bias:

In the case of 1/2 bias:

When static duty is selected, the segment lines are not multiplexed, which means that each segment output corresponds to one pixel. In this way only up to 44 pixels can be driven. COM[0] is always active while COM[7:1] are not used and are driven to \( V_{SS} \) .

When the LCDEN bit in the LCD_CR register is reset, all common lines are pulled down to \( V_{SS} \) and the ENS flag in the LCD_SR register becomes 0. Static duty means that COM[0] is always active and only two voltage levels are used for the segment and common lines: \( V_{LCD} \) and \( V_{SS} \) . A pixel is active if the corresponding SEG line has a voltage opposite to that of the COM, and inactive when the voltages are equal. In this way the LCD has maximum contrast (see Figure 74, Figure 75). In the Figure 74 pixel 0 is active while pixel 1 is inactive.

Figure 74. Static duty

Timing diagram for static duty showing voltage levels for COM0, SEG0, and SEG1 over four frames (Odd, Even, Odd, Even).

The diagram shows the voltage levels for COM0, SEG0, and SEG1 over four frames: Odd frame, Even frame, Odd frame, and Even frame. The vertical axis lists the signals and their possible voltage levels: \( V_{LCD} \) , \( V_{SS} \) , 0, and \( -V_{LCD} \) .

Below the main diagram, two additional rows show the voltage levels for COM0 and SEG0/SEG1 when the COM0 signal is inverted (0 instead of \( V_{LCD} \) and \( -V_{LCD} \) instead of \( V_{SS} \) ).

MS33439V1

Timing diagram for static duty showing voltage levels for COM0, SEG0, and SEG1 over four frames (Odd, Even, Odd, Even).

In each frame there is only one phase, this is why \( f_{frame} \) is equal to \( f_{LCD} \) . If 1/4 duty is selected there are four phases in a frame in which COM[0] is active during phase 0, COM[1] is active during phase 1, COM[2] is active during phase 2, and COM[3] is active during phase 3.

Figure 75. Static duty

Figure 75. Static duty. This figure illustrates the static duty mode for an LCD controller. On the left, two diagrams show the 'Liquid crystal display and terminal connection'. The top diagram shows a 4x4 grid of pixels connected to a common terminal COM0 and segment terminals SEG0 through SEG7. The bottom diagram shows a more detailed view of the pixel connections, with segments SEG0 through SEG7 connected to the grid. On the right, a timing diagram shows the waveforms for the pins. The top four waveforms are for PIN COM0, PIN SEG0, PIN SEG1, and COM0-SEG0 selected waveform, all showing square waves between 0/1V and 1/1V. The bottom waveform is for COM0-SEG1 non selected waveform, which is a constant 0/1V. Vertical dashed lines indicate the timing phases. The identifier MS33440V1 is in the bottom right corner.
Figure 75. Static duty. This figure illustrates the static duty mode for an LCD controller. On the left, two diagrams show the 'Liquid crystal display and terminal connection'. The top diagram shows a 4x4 grid of pixels connected to a common terminal COM0 and segment terminals SEG0 through SEG7. The bottom diagram shows a more detailed view of the pixel connections, with segments SEG0 through SEG7 connected to the grid. On the right, a timing diagram shows the waveforms for the pins. The top four waveforms are for PIN COM0, PIN SEG0, PIN SEG1, and COM0-SEG0 selected waveform, all showing square waves between 0/1V and 1/1V. The bottom waveform is for COM0-SEG1 non selected waveform, which is a constant 0/1V. Vertical dashed lines indicate the timing phases. The identifier MS33440V1 is in the bottom right corner.

In this mode, the segment terminals are multiplexed and each of them control four pixels. A pixel is activated only when both of its corresponding SEG and COM lines are active in the same phase. In case of 1/4 duty, to deactivate pixel 0 connected to COM[0] the SEG[0] needs to be inactive during the phase 0 when COM[0] is active. To activate pixel 44 connected to COM[1] the SEG[0] needs to be active during phase 1 when COM[1] is active (see Figure 78). To activate pixels from 0 to 43 connected to COM[0], SEG[0:43] need to be active during phase 0 when COM[0] is active. These considerations can be extended to the other pixels.

8 to 1 Mux

When COM[0] is active the common driver block, also drives the 8 to 1 mux shown in Figure 72 in order to select the content of first two RAM register locations. When COM[7] is active, the output of the 8 to 1 mux is the content of the last two RAM locations.

Start of frame (SOF)

The common driver block is also able to generate an SOF (start of frame flag) (see Section 16.5.3). The LCD start of frame interrupt is executed if the SOFIE (start of frame interrupt enable) bit is set (see Section 16.5.2). SOF is cleared by writing the SOFC bit to 1 in the LCD_CLR register when executing the corresponding interrupt handling vector.

Figure 76. 1/2 duty, 1/2 bias

Figure 76: 1/2 duty, 1/2 bias. The figure shows a liquid crystal display (LCD) terminal connection diagram and timing waveforms. The terminal connection diagram shows a pixel connected to COM1 and COM0, and four segments (SEG0, SEG1, SEG2, SEG3) connected to the pixel. The timing waveforms show the voltage levels for PIN COM0, PIN COM1, PIN SEG0, PIN SEG1, COM0-SEG0 selected waveform, and COM0-SEG1 non selected waveform over time. The voltage levels range from -2/2 V to 2/2 V, with intermediate levels at 1/2 V, 0/2 V, and -1/2 V. The waveforms are square waves with a 1/2 duty cycle. The selected waveform (COM0-SEG0) has a peak-to-peak voltage of V_LCD, while the non-selected waveform (COM0-SEG1) has a peak-to-peak voltage of V_LCD/2. The reference MS33441V1 is shown at the bottom right.
Figure 76: 1/2 duty, 1/2 bias. The figure shows a liquid crystal display (LCD) terminal connection diagram and timing waveforms. The terminal connection diagram shows a pixel connected to COM1 and COM0, and four segments (SEG0, SEG1, SEG2, SEG3) connected to the pixel. The timing waveforms show the voltage levels for PIN COM0, PIN COM1, PIN SEG0, PIN SEG1, COM0-SEG0 selected waveform, and COM0-SEG1 non selected waveform over time. The voltage levels range from -2/2 V to 2/2 V, with intermediate levels at 1/2 V, 0/2 V, and -1/2 V. The waveforms are square waves with a 1/2 duty cycle. The selected waveform (COM0-SEG0) has a peak-to-peak voltage of V_LCD, while the non-selected waveform (COM0-SEG1) has a peak-to-peak voltage of V_LCD/2. The reference MS33441V1 is shown at the bottom right.

16.4.4 Segment driver

The segment driver block controls the SEG lines according to the pixel data coming from the 8 to 1 mux driven in each phase by the common driver block.

In the case of 1/4 or 1/8 duty

When COM[0] is active, the pixel information (active/inactive) related to the pixel connected to COM[0] (content of the first two LCD_RAM locations) goes through the 8 to 1 mux.

The SEG[n] pin \( n \) [0 to 43] is driven to \( V_{SS} \) (indicating pixel \( n \) is active when COM[0] is active) in phase 0 of the odd frame.

The SEG[n] pin is driven to \( V_{LCD} \) in phase 0 of the even frame. If pixel \( n \) is inactive then the SEG[n] pin is driven to \( 2/3 \) ( \( 2/4 \) ) \( V_{LCD} \) in the odd frame or \( 1/3 \) ( \( 2/4 \) ) \( V_{LCD} \) in the even frame (current inversion in \( V_{LCD} \) pad) (see Figure 73).

In case of 1/2 bias, if the pixel is inactive the SEG[n] pin is driven to \( V_{LCD} \) in the odd and to \( V_{SS} \) in the even frame.

When the LCD controller is disabled (LCDEN bit cleared in the LCD_CR register) then the SEG lines are pulled down to \( V_{SS} \) .

Figure 77. 1/3 duty, 1/3 bias

Timing diagram for 1/3 duty, 1/3 bias LCD controller showing terminal connections and waveforms for COM0, COM1, COM2, SEG0, SEG1, SEG2, selected waveform (COM0-SEG1), and non selected waveform (COM0-SEG0).

The figure illustrates the terminal connections and timing waveforms for an LCD controller operating in 1/3 duty and 1/3 bias mode. On the left, two diagrams show the 'Liquid crystal display and terminal connection'. The top diagram shows common terminals COM0, COM1, and COM2 connected to the common electrode of the LCD. The bottom diagram shows segment terminals SEG0, SEG1, and SEG2 connected to the segment electrodes. On the right, timing diagrams show the voltage levels over time for various pins and waveforms. The voltage levels for COM pins are 3/3 V, 2/3 V, 1/3 V, and 0/3 V. The voltage levels for SEG pins are 3/3 V, 2/3 V, 1/3 V, and 0/3 V. The selected waveform (COM0-SEG1) has voltage levels of 3/3 V, 2/3 V, 1/3 V, 0/3 V, -1/3 V, -2/3 V, and -3/3 V. The non selected waveform (COM0-SEG0) has voltage levels of 1/3 V, 0/3 V, and -1/3 V. A '1 frame' duration is indicated at the bottom.

Liquid crystal display and terminal connection

COM2

COM1

COM0

SEG0

SEG1

SEG2

Timing Waveforms:

1 frame

MS33442V1

Timing diagram for 1/3 duty, 1/3 bias LCD controller showing terminal connections and waveforms for COM0, COM1, COM2, SEG0, SEG1, SEG2, selected waveform (COM0-SEG1), and non selected waveform (COM0-SEG0).

Figure 78. 1/4 duty, 1/3 bias

Timing diagram for 1/4 duty, 1/3 bias LCD controller showing terminal connections and waveforms for COM0, COM1, COM2, SEG0, SEG1, selected waveform (COM0-SEG1), and non selected waveform (COM0-SEG0).

Liquid crystal display and terminal connection

COM3

COM2

COM1

COM0

SEG0

SEG1

PIN COM0

PIN COM1

PIN COM2

PIN SEG0

PIN SEG1

3/3 V
2/3 V
1/3 V
0/3 V

COM0-SEG1 selected waveform

3/3 V
2/3 V
1/3 V
0/3 V
-1/3 V
-2/3 V
-3/3 V

COM0-SEG0 non selected waveform

1/3 V
0/3 V
-1/3 V

1 frame

MS33443V1

Timing diagram for 1/4 duty, 1/3 bias LCD controller showing terminal connections and waveforms for COM0, COM1, COM2, SEG0, SEG1, selected waveform (COM0-SEG1), and non selected waveform (COM0-SEG0).

Figure 79. 1/8 duty, 1/4 bias

Figure 79: 1/8 duty, 1/4 bias timing diagram and terminal connections.

The figure illustrates the timing and terminal connections for an LCD controller operating in 1/8 duty and 1/4 bias mode. On the left, two diagrams show the 'Liquid crystal display and terminal connection'. The top diagram shows connections for COM0, COM1, COM2, COM3, COM4, COM5, COM6, and COM7 to a 7-segment style display. The bottom diagram shows connections for SEG0 and COM0. The main part of the figure is a timing diagram showing waveforms for several pins over one frame. The pins and waveforms shown are:

The vertical axis on the right indicates voltage levels: 4/4 V, 3/4 V, 2/4 V, 1/4 V, 0/4 V, -1/4 V, -2/4 V, -3/4 V, and -4/4 V. A horizontal double-headed arrow at the bottom indicates the duration of '1 frame'. The identifier 'MS33444V1' is located in the bottom right corner of the diagram area.

Figure 79: 1/8 duty, 1/4 bias timing diagram and terminal connections.

The segment driver also implements a programmable blink feature to allow some pixels to continuously switch on at a specific frequency. The blink mode can be configured by the BLINK[1:0] bits in the LCD_FCR register, making possible to blink up to 1, 2, 4, 8 or all pixels (see Section 16.5.2 ). The blink frequency can be selected from eight different values using the BLINKF[2:0] bits in the LCD_FCR register.

Table 75 gives examples of different blink frequencies (as a function of ck_div frequency).

Table 75. Blink frequency

BLINKF[2:0] bitsck_div frequency (with LCDCLK frequency of 32.768 kHz)
32 Hz64 Hz128 Hz256 Hz
0004.0 HzN/AN/AN/A
0012.0 Hz4.0 HzN/AN/A
0101.0 Hz2.0 Hz4.0 HzN/A
0110.5 Hz1.0 Hz2.0 Hz4.0 Hz
1000.25 Hz0.5 Hz1.0 Hz2.0 Hz
101N/A0.25 Hz0.5 Hz1.0 Hz
110N/AN/A0.25 Hz0.5 Hz
111N/AN/AN/A0.25 Hz

16.4.5 Voltage generator

The LCD voltage levels are generated by the \( V_{LCD} \) pin or by the internal voltage step-up converter (depending on the VSEL bit in the LCD_CR register), through an internal resistor divider network as shown in Figure 80 .

The LCD voltage generator generates intermediate voltage levels between \( V_{SS} \) and \( V_{LCD} \) :

For the divider network, two resistive networks one with low value resistors ( \( R_L \) ) and one with high value resistors ( \( R_H \) ) are respectively used to increase the current during transitions and to reduce power consumption in static state.

The PON[2:0] (Pulse ON duration) bits in the LCD_FCR register configure the time during which \( R_L \) is enabled (see Figure 72 ) when the levels of the common and segment lines change. A short drive time leads to lower power consumption, but displays with high internal resistance need a longer drive time to achieve satisfactory contrast.

Figure 80. LCD voltage control

Figure 80: LCD voltage control circuit diagram. The diagram illustrates a voltage divider network used to generate intermediate LCD voltage levels. It features two parallel resistor ladders: one with low-resistance resistors (RL) and another with high-resistance resistors (RH). The RL ladder is controlled by switches labeled 'HD', while the overall network is enabled by a switch labeled 'LCDEN' connected to VLCD. The resistors are arranged in segments of 3R, R, 2R, 2R, R, and 3R from top to bottom, connected to Vss at the base. Taps between these resistors provide voltage levels: 3/4 x VLCD, 2/3 x VLCD, 1/2 x VLCD, 1/3 x VLCD, and 1/4 x VLCD. A set of switches, controlled by BIAS[1] and an inverter, selects which of these intermediate voltages are routed to the output rails: VLCDrail3, VLCDrail2, and VLCDrail1. The diagram also includes a buffer/inverter for the BIAS[1] signal.
Figure 80: LCD voltage control circuit diagram. The diagram illustrates a voltage divider network used to generate intermediate LCD voltage levels. It features two parallel resistor ladders: one with low-resistance resistors (RL) and another with high-resistance resistors (RH). The RL ladder is controlled by switches labeled 'HD', while the overall network is enabled by a switch labeled 'LCDEN' connected to VLCD. The resistors are arranged in segments of 3R, R, 2R, 2R, R, and 3R from top to bottom, connected to Vss at the base. Taps between these resistors provide voltage levels: 3/4 x VLCD, 2/3 x VLCD, 1/2 x VLCD, 1/3 x VLCD, and 1/4 x VLCD. A set of switches, controlled by BIAS[1] and an inverter, selects which of these intermediate voltages are routed to the output rails: VLCDrail3, VLCDrail2, and VLCDrail1. The diagram also includes a buffer/inverter for the BIAS[1] signal.

The \( R_L \) divider can be always switched on using the HD bit in the LCD_FCR configuration register (see Section 16.5.2 ). The \( V_{LCD} \) value can be chosen among a wide set of values from \( V_{LCDmin} \) to \( V_{LCDmax} \) by means of CC[2:0] (contrast control) bits inside LCD_FCR (see Section 16.5.2 ) register. New values of \( V_{LCD} \) take effect every beginning of a new frame.

After the LCDEN bit is activated the voltage generator sets the RDY bit in the LCD_SR register to indicate that the voltage levels are stable and the LCD controller can start to work.

External decoupling

Devices with \( V_{LCD} \) rails decoupling capability (see the datasheets) offer the possibility to add decoupling capacitors on \( V_{LCD} \) intermediate voltage rails ( \( V_{LCDrail1} \) , \( V_{LCDrail2} \) , \( V_{LCDrail3} \) - see Figure 80 ) for stabilization purpose. Spikes may be observed when voltage applied to the pixel is alternated. In this case, these decoupling capacitors help to get a steady voltage resulting in a higher contrast. This capability is particularly useful for consumption reason as it can be used to select low PON[2:0] values in the LCD_FCR register.

To connect the \( V_{LCD} \) rails as described in Table 76 to the dedicated GPIOs, configure the LCD_CAPA[4:0] bits of the SYSCFG_PMC register.

Table 76.\( V_{LCDrail} \) connections to GPIO pins
BiasPin
(selection by LCD_CAPA[4:0] bits)
1/21/31/4
\( V_{LCDrail3} \)Not usedNot used3/4 \( V_{lcd} \)PB0 or PE12
\( V_{LCDrail1} \)1/2 \( V_{lcd} \)2/3 \( V_{lcd} \)1/2 \( V_{lcd} \)PB2
\( V_{LCDrail2} \)Not used1/3 \( V_{lcd} \)1/4 \( V_{lcd} \)PB12 or PE11

To be effective, the values of these decoupling capacitors must be tuned according to the LCD glass and the PCB capacitances. As a guideline to user can set the decoupling capacitor values to 10 time the LCD capacitance.

16.4.6 Deadtime

In addition to using the CC[2:0] bits, the contrast can be controlled by programming a dead time between each frame. During the dead time the COM and SEG values are put to \( V_{SS} \) . The DEAD[2:0] bits in the LCD_FCR register can be used to program a time of up to eight phase periods. This dead time reduces the contrast without modifying the frame rate.

Figure 81. Deadtime

Timing diagram showing the sequence of frames and dead time. It illustrates the transition from an Odd frame to an Even frame, followed by a Dead time period, and then back to an Odd frame and an Even frame. The signal levels are shown as step functions over time, with the Dead time period marked by a horizontal line at the bottom level (Vss).
  Odd frame   Even frame  Dead time  Odd frame   Even frame
  ___         ___                    ___         ___
 |   |       |   |                  |   |       |   |
_|   |_______|   |__________________|   |_______|   |___

The diagram shows a sequence of frames: Odd frame, Even frame, Dead time, Odd frame, Even frame. The signal levels are shown as step functions over time. During the 'Dead time' period, the signal is held at the lowest level ( \( V_{SS} \) ). The transition between frames is shown as a step change in the signal level.

Timing diagram showing the sequence of frames and dead time. It illustrates the transition from an Odd frame to an Even frame, followed by a Dead time period, and then back to an Odd frame and an Even frame. The signal levels are shown as step functions over time, with the Dead time period marked by a horizontal line at the bottom level (Vss).

16.4.7 Double buffer memory

Using its double buffer memory the LCD controller ensures the coherency of the displayed information without having to use interrupts to control LCD_RAM modification.

The application software can access the first buffer level (LCD_RAM) through the APB interface. Once it has modified the LCD_RAM, it sets the UDR flag in the LCD_SR register. This UDR flag (update display request) requests the updated information to be moved into the second buffer level (LCD_DISPLAY).

This operation is done synchronously with the frame (at the beginning of the next frame), until the update is completed, the LCD_RAM is write protected and the UDR flag stays high. Once the update is completed another flag (UDD - Update Display Done) is set and generates an interrupt if the UDDIE bit in the LCD_FCR register is set.

The time it takes to update LCD_DISPLAY is, in the worst case, one odd and one even frame.

The update does not occur (UDR = 1 and UDD = 0) until the display is enabled (LCDEN = 1)

16.4.8 COM and SEG multiplexing

Output pins versus duty modes

The output pins consists of:

Depending on the duty configuration, the COM and SEG output pins may have different functions:

Remapping capability

Additionally, it is possible to remap 4 segments by setting the MUX_SEG bit in the LCD_CR register. This is particularly useful when using smaller device types with fewer external pins.

When MUX_SEG is set, output pins SEG[43:40] have function SEG[31:28].

Summary of COM and SEG functions versus duty and remap

All the possible ways of multiplexing the COM and SEG functions are described in Table 77 . Figure 82 gives examples showing the signal connections to the external pins.

Table 77. Remapping capability

Configuration bitsCapabilityOutput pinFunction
DUTYMUX_SEG
1/8040x8SEG[43:40]COM[7:4]
COM[3:0]COM[3:0]
SEG[39:0]SEG[39:0]
128x8SEG[43:40]COM[7:4]
COM[3:0]COM[3:0]
SEG[39:28]not used
SEG[27:0]SEG[27:0]
1/4044x4COM[3:0]COM[3:0]
SEG[43:0]SEG[43:0]
132x4COM[3:0]COM[3:0]
SEG[43:40]SEG[31:28]
SEG[39:28]not used
SEG[27:0]SEG[27:0]
1/3044x3COM[3]not used
COM[2:0]COM[2:0]
SEG[43:0]SEG[43:0]
132x3COM[3]not used
COM[2:0]COM[2:0]
SEG[43:40]SEG[31:28]
SEG[39:28]not used
SEG[27:0]SEG[27:0]
1/2044x2COM[3:2]not used
COM[1:0]COM[1:0]
SEG[43:0]SEG[43:0]
132x2COM[3:2]not used
COM[1:0]COM[1:0]
SEG[43:40]SEG[31:28]
SEG[39:28]not used
SEG[27:0]SEG[27:0]

Table 77. Remapping capability (continued)

Configuration bitsCapabilityOutput pinFunction
DUTYMUX_SEG
STATIC044x1COM[3:1]not used
COM[0]COM[0]
SEG[43:0]SEG[43:0]
132x1COM[3:1]not used
COM[0]COM[0]
SEG[43:40]SEG[31:28]
SEG[39:28]not used
SEG[27:0]SEG[27:0]

Figure 82. SEG/COM mux feature example

Three diagrams illustrating SEG/COM mux feature examples for LCD controller configurations. Each diagram shows an LCD CONTROLLER block containing a SEG DRIVER, a COM DRIVER, and a SEG COM MUX. The SEG DRIVER has outputs SEG[43] and SEG[31]. The COM DRIVER has output COM[7]. The SEG COM MUX selects between these outputs to drive the LCD_SEG[43] PIN via SEG_OUT[43]. The top diagram shows SEG[31] selected. The middle diagram shows SEG[43] selected. The bottom diagram shows COM[7] selected. Below each diagram are conditions: DUTY ≠ 1/8 and MUX_SEG = 0 for the top two, and DUTY = 1/8 and MUX_SEG = 0 for the bottom one.

The figure consists of three vertically stacked diagrams, each enclosed in a dashed box, illustrating different internal configurations of an LCD CONTROLLER. Each controller block contains three sub-components: a SEG DRIVER, a COM DRIVER, and a SEG COM MUX. The SEG DRIVER has two output pins, SEG[43] and SEG[31]. The COM DRIVER has one output pin, COM[7]. The SEG COM MUX is connected to these three pins and has a single output pin, SEG_OUT[43], which is connected to an external LCD_SEG[43] PIN. In the top diagram, the SEG[31] pin is highlighted with a black square, indicating it is the selected output. In the middle diagram, the SEG[43] pin is highlighted with a black square. In the bottom diagram, the COM[7] pin is highlighted with a black square. Below each diagram, text specifies the operating conditions: 'DUTY ≠ 1/8 and MUX_SEG = 0' for the top two diagrams and 'DUTY = 1/8 and MUX_SEG = 0' for the bottom diagram. A small code 'MS33449V1' is located in the bottom right corner of the entire figure.

MS33449V1

Three diagrams illustrating SEG/COM mux feature examples for LCD controller configurations. Each diagram shows an LCD CONTROLLER block containing a SEG DRIVER, a COM DRIVER, and a SEG COM MUX. The SEG DRIVER has outputs SEG[43] and SEG[31]. The COM DRIVER has output COM[7]. The SEG COM MUX selects between these outputs to drive the LCD_SEG[43] PIN via SEG_OUT[43]. The top diagram shows SEG[31] selected. The middle diagram shows SEG[43] selected. The bottom diagram shows COM[7] selected. Below each diagram are conditions: DUTY ≠ 1/8 and MUX_SEG = 0 for the top two, and DUTY = 1/8 and MUX_SEG = 0 for the bottom one.

16.4.9 Flowchart

Figure 83. Flowchart example

Flowchart for LCD controller initialization and management. The process starts with START, followed by INIT (enable GPIO clocks, configure pins, configure controller). Then, load initial data into LCD_RAM and set UDR in LCD_SR. Next, program frame rate (PS, DIV in LCD_FCR) and contrast (CC in LCD_FCR). Enable the display (LCDEN in LCD_CR). A loop follows: Adjust contrast? (Yes: Change PS, DIV, CC, PON, DEAD, or HD in LCD_FCR; No: Modify data? Yes: UDR = 1? No: Modify LCD_RAM, Set UDR in LCD_SR; No: Change blink? Yes: Change BLINK or BLINKF in LCD_FCR; No: Disable LCD? Yes: Disable display (LCDEN in LCD_CR), ENS = 0? Yes: END; No: Loop back to Adjust contrast?).
graph TD; START([START]) --> INIT["INIT<br/>- Enable the GPIO port clocks<br/>- Configure the LCD GPIO pins as alternate functions<br/>- Configure LCD controller according to the display to be driven"]; INIT --> LoadData["- Load the initial data to be displayed into<br/>LCD_RAM and set the UDR in LCD_SR"]; LoadData --> ProgramFrameRate["- Program the desired frame rate (PS and DIV in LCD_FCR)<br/>- Program the contrast (CC in LCD_FCR)"]; ProgramFrameRate --> EnableDisplay["Enable the display (LCDEN in LCD_CR)"]; EnableDisplay --> AdjustContrast{Adjust contrast?}; AdjustContrast -- Yes --> ChangePS["Change PS, DIV, CC, PON,<br/>DEAD, or HD in LCD_FCR"]; AdjustContrast -- No --> ModifyData{Modify data?}; ModifyData -- Yes --> UDR1{UDR = 1?}; UDR1 -- No --> ModifyRAM["Modify the LCD_RAM"]; ModifyRAM --> SetUDR["Set UDR in LCD_SR"]; SetUDR --> AdjustContrast; ModifyData -- No --> ChangeBlink{Change blink?}; ChangeBlink -- Yes --> ChangeBlinkF["Change BLINK or BLINKF<br/>in LCD_FCR"]; ChangeBlinkF --> AdjustContrast; ChangeBlink -- No --> DisableLCD{Disable LCD?}; DisableLCD -- Yes --> DisableDisplay["Disable the display (LCDEN in LCD_CR)"]; DisableDisplay --> ENS0{ENS = 0?}; ENS0 -- Yes --> END([END]); ENS0 -- No --> AdjustContrast;
Flowchart for LCD controller initialization and management. The process starts with START, followed by INIT (enable GPIO clocks, configure pins, configure controller). Then, load initial data into LCD_RAM and set UDR in LCD_SR. Next, program frame rate (PS, DIV in LCD_FCR) and contrast (CC in LCD_FCR). Enable the display (LCDEN in LCD_CR). A loop follows: Adjust contrast? (Yes: Change PS, DIV, CC, PON, DEAD, or HD in LCD_FCR; No: Modify data? Yes: UDR = 1? No: Modify LCD_RAM, Set UDR in LCD_SR; No: Change blink? Yes: Change BLINK or BLINKF in LCD_FCR; No: Disable LCD? Yes: Disable display (LCDEN in LCD_CR), ENS = 0? Yes: END; No: Loop back to Adjust contrast?).

MS33450V1

16.5 LCD registers

The peripheral registers have to be accessed by words (32-bit).

16.5.1 LCD control register (LCD_CR)

Address offset: 0x00

Reset value: 0x0000 0000

31302928272625242322212019181716
Reserved
1514131211109876543210
ReservedMUX_SEGBIAS[1:0]DUTY[2:0]VSELLCDEN
rw/rrw/rrw/rrw/rrw/rrw/rrw/rrw

Bits 31:8 Reserved, must be kept at reset value

Bit 7 MUX_SEG : Mux segment enable

This bit is used to enable SEG pin remapping. Four SEG pins can be multiplexed with SEG[31:28]. See Section 16.4.8 .

Bits 6:5 BIAS[1:0] : Bias selector

These bits determine the bias used. Value 11 is forbidden.

Bits 4:2 DUTY[2:0] : Duty selection

These bits determine the duty cycle. Values 101, 110 and 111 are forbidden.

Bit 1 VSEL : Voltage source selection

The VSEL bit determines the voltage source for the LCD.

Bit 0 LCDEN : LCD controller enable

This bit is set by software to enable the LCD Controller/Driver. It is cleared by software to turn off the LCD at the beginning of the next frame. When the LCD is disabled all COM and SEG pins are driven to V SS .

Note: The VSEL, MUX_SEG, BIAS and DUTY bits are write protected when the LCD is enabled (ENS bit in LCD_SR to 1).

16.5.2 LCD frame control register (LCD_FCR)

Address offset: 0x04

Reset value: 0x0000 0000

31302928272625242322212019181716
ReservedPS[3:0]DIV[3:0]BLINK[1:0]
rwrwrwrwrwrwrwrwrwrw
1514131211109876543210
BLINKF[2:0]CC[2:0]DEAD[2:0]PON[2:0]UDDIERes.SOFIEHD
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:26 Reserved, must be kept at reset value

Bits 25:22 PS[3:0] : PS 16-bit prescaler

These bits are written by software to define the division factor of the PS 16-bit prescaler.
\( ck\_ps = LCDCLK / (2^{PS[3:0]}) \) . See Section 16.4.2 .

0000: \( ck\_ps = LCDCLK \)

0001: \( ck\_ps = LCDCLK/2 \)

0011: \( ck\_ps = LCDCLK/4 \)

...

1111: \( ck\_ps = LCDCLK/32768 \)

Bits 21:18 DIV[3:0] : DIV clock divider

These bits are written by software to define the division factor of the DIV divider. See Section 16.4.2 .

0000: \( ck\_div = ck\_ps/16 \)

0001: \( ck\_div = ck\_ps/17 \)

0011: \( ck\_div = ck\_ps/18 \)

...

1111: \( ck\_div = ck\_ps/31 \)

Bits 17:16 BLINK[1:0] : Blink mode selection

00: Blink disabled

01: Blink enabled on SEG[0], COM[0] (1 pixel)

10: Blink enabled on SEG[0], all COMs (up to 8 pixels depending on the programmed duty)

11: Blink enabled on all SEGs and all COMs (all pixels)

Bits 15:13 BLINKF[2:0] : Blink frequency selection

000: \( f_{LCD}/8 \) 100: \( f_{LCD}/128 \)

001: \( f_{LCD}/16 \) 101: \( f_{LCD}/256 \)

010: \( f_{LCD}/32 \) 110: \( f_{LCD}/512 \)

011: \( f_{LCD}/64 \) 111: \( f_{LCD}/1024 \)

Bits 12:10 CC[2:0] : Contrast control

These bits specify one of the \( V_{LCD} \) maximum voltages (independent of \( V_{DD} \) ). It ranges from 2.60 V to 3.51V.

000: \( V_{LCD0} \) 100: \( V_{LCD4} \)

001: \( V_{LCD1} \) 101: \( V_{LCD5} \)

010: \( V_{LCD2} \) 110: \( V_{LCD6} \)

011: \( V_{LCD3} \) 111: \( V_{LCD7} \)

Note: Refer to the product datasheet for the \( V_{LCDx} \) values.

Bits 9:7 DEAD[2:0] : Dead time duration

These bits are written by software to configure the length of the dead time between frames. During the dead time the COM and SEG voltage levels are held at 0 V to reduce the contrast without modifying the frame rate.

000: No dead time

001: 1 phase period dead time

010: 2 phase period dead time

.....

111: 7 phase period dead time

Bits 6:4 PON[2:0] : Pulse ON duration

These bits are written by software to define the pulse duration in terms of \( ck\_ps \) pulses, during which the low resistance divider is enabled. A short pulse leads to lower power consumption, but displays with

high internal resistance may need a longer pulse to achieve satisfactory contrast.

Note that the pulse is never longer than one half prescaled LCD clock period.

000: 0 100: 4/ \( ck\_ps \)

001: 1/ \( ck\_ps \) 101: 5/ \( ck\_ps \)

010: 2/ \( ck\_ps \) 110: 6/ \( ck\_ps \)

011: 3/ \( ck\_ps \) 111: 7/ \( ck\_ps \)

PON duration example with LCDCLK = 32.768 kHz and PS=0x03:

000: 0 \( \mu s \) 100: 976 \( \mu s \)

001: 244 \( \mu s \) 101: 1.22 ms

010: 488 \( \mu s \) 110: 1.46 ms

011: 782 \( \mu s \) 111: 1.71 ms

Bit 3 UDDIE : Update display done interrupt enable

This bit is set and cleared by software.

0: LCD Update Display Done interrupt disabled

1: LCD Update Display Done interrupt enabled

Bit 2 Reserved, must be kept at reset value

Bit 1 SOFIE : Start of frame interrupt enable

This bit is set and cleared by software.

0: LCD Start of Frame interrupt disabled

1: LCD Start of Frame interrupt enabled

Bit 0 HD : High drive enable

This bit is written by software to enable a low resistance divider. Displays with high internal resistance may need a stronger drive to achieve satisfactory contrast. This bit is useful in this case if some additional power consumption can be tolerated.

0: High drive disabled

1: High drive enabled. When HD=1, then the PON bits have to be programmed to a value different than 000.

Note: The data in this register can be updated any time, however the new values are applied only at the beginning of the next frame (except for CC, UDDIE, SOFIE that affect the device behavior immediately).

Reading this register obtains the last value written in the register and not the configuration used to display the current frame.

16.5.3 LCD status register (LCD_SR)

Address offset: 0x08

Reset value: 0x0000 0020

31302928272625242322212019181716
Reserved
1514131211109876543210
ReservedFCRSFRDYUDDUDRSOFENS
rrrrrsrr

Bits 31:6 Reserved, must be kept at reset value

Bit 5 FCRSF : LCD Frame Control Register Synchronization flag

This bit is set by hardware each time the LCD_FCR register is updated in the LCDCLK domain. It is cleared by hardware when writing to the LCD_FCR register.

0: LCD Frame Control Register not yet synchronized

1: LCD Frame Control Register synchronized

Bit 4 RDY : Ready flag

This bit is set and cleared by hardware. It indicates the status of the step-up converter.

0: Not ready

1: Step-up converter is enabled and ready to provide the correct voltage.

Bit 3 UDD : Update Display Done

This bit is set by hardware. It is cleared by writing 1 to the UDDC bit in the LCD_CLR register. The bit set has priority over the clear.

0: No event

1: Update Display Request done. A UDD interrupt is generated if the UDDIE bit in the LCD_FCR register is set.

Note: If the device is in STOP mode (PCLK not provided) UDD does not generate an interrupt even if UDDIE = 1.

If the display is not enabled, the UDD interrupt never occurs.

Bit 2 UDR : Update display request

Each time software modifies the LCD_RAM it must set the UDR bit to transfer the updated data to the second level buffer. The UDR bit stays set until the end of the update and during this time the LCD_RAM is write protected.

0: No effect
1: Update Display request

Note: When the display is disabled, the update is performed for all LCD_DISPLAY locations. When the display is enabled, the update is performed only for locations for which commons are active (depending on DUTY). For example if DUTY = 1/2, only the LCD_DISPLAY of COM0 and COM1 are updated.

Note: Writing 0 on this bit or writing 1 when it is already 1 has no effect. This bit can be cleared by hardware only. It can be cleared only when LCDEN = 1

Bit 1 SOF : Start of frame flag

This bit is set by hardware at the beginning of a new frame, at the same time as the display data is updated. It is cleared by writing a 1 to the SOFC bit in the LCD_CLR register. The bit clear has priority over the set.

0: No event
1: Start of Frame event occurred. An LCD Start of Frame Interrupt is generated if the SOFIE bit is set.

Bit 0 ENS : LCD enabled status

This bit is set and cleared by hardware. It indicates the LCD controller status.

0: LCD Controller disabled.
1: LCD Controller enabled

Note: The ENS bit is set immediately when the LCDEN bit in the LCD_CR goes from 0 to 1. On deactivation it reflects the real status of LCD so it becomes 0 at the end of the last displayed frame.

16.5.4 LCD clear register (LCD_CLR)

Address offset: 0x0C

Reset value: 0x0000 0000

31302928272625242322212019181716
Reserved
1514131211109876543210
ReservedUDDCRes.SOFCRes.
ww

Bits 31:2 Reserved, must be kept at reset value

Bit 3 UDDC : Update display done clear

This bit is written by software to clear the UDD flag in the LCD_SR register.

0: No effect
1: Clear UDD flag

Bit 2 Reserved, must be kept at reset value

Bit 1 SOFC : Start of frame flag clear

This bit is written by software to clear the SOF flag in the LCD_SR register.

0: No effect

1: Clear SOF flag

Bit 0 Reserved, must be kept at reset value

16.5.5 LCD display memory (LCD_RAM)

Address offset: 0x14-0x50

Reset value: 0x0000 0000

31302928272625242322212019181716
SEGMENT_DATA[31:16]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
SEGMENT_DATA[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 SEGMENT_DATA[31:0]

Each bit corresponds to one pixel of the LCD display.

0: Pixel inactive

1: Pixel active

16.5.6 LCD register map

The following table summarizes the LCD registers. The reserved memory areas are highlighted in gray in the table.

Table 78. LCD register map and reset values

OffsetRegister313029282726252423222120191817161514131211109876543210
0x00LCD_CRReservedMUX_SEGBIAS[1:0]DUTY[2:0]VSELLCDEN
Reset value0000000
0x04LCD_FCRReservedPS[3:0]DIV[3:0]BLINK[1:0]BLINKF[2:0]CC[2:0]DEAD[2:0]PON[2:0]UDDIEReservedSOFIEHD
Reset value0000000000000000000000000000
0x08LCD_SRReservedFCRSFRDYUDDUDRSOFENS
Reset value100000

Table 78. LCD register map and reset values (continued)

OffsetRegister313029282726252423222120191817161514131211109876543210
0x0CLCD_CLRReservedUDDCReservedSOFCReserved
Reset value0000
0x14LCD_RAM (COM0)S31S30S29S28S27S26S25S24S23S22S21S20S19S18S17S16S15S14S13S12S11S10S09S08S07S06S05S04S03S02S01S00
00000000000000000000000000000000
0x18LCD_RAM (COM0)ReservedS43S42S41S40S39S38S37S36S35S34S33S32
000000000000
0x1CLCD_RAM (COM1)S31S30S29S28S27S26S25S24S23S22S21S20S19S18S17S16S15S14S13S12S11S10S09S08S07S06S05S04S03S02S01S00
00000000000000000000000000000000
0x20LCD_RAM (COM1)ReservedS43S42S41S40S39S38S37S36S35S34S33S32
000000000000
0x24LCD_RAM (COM2)S31S30S29S28S27S26S25S24S23S22S21S20S19S18S17S16S15S14S13S12S11S10S09S08S07S06S05S04S03S02S01S00
00000000000000000000000000000000
0x28LCD_RAM (COM2)ReservedS43S42S41S40S39S38S37S36S35S34S33S32
000000000000
0x2CLCD_RAM (COM3)S31S30S29S28S27S26S25S24S23S22S21S20S19S18S17S16S15S14S13S12S11S10S09S08S07S06S05S04S03S02S01S00
00000000000000000000000000000000
0x30LCD_RAM (COM3)ReservedS43S42S41S40S39S38S37S36S35S34S33S32
000000000000
0x34LCD_RAM (COM4)S31S30S29S28S27S26S25S24S23S22S21S20S19S18S17S16S15S14S13S12S11S10S09S08S07S06S05S04S03S02S01S00
00000000000000000000000000000000
0x38LCD_RAM (COM4)Reserved
0x3CLCD_RAM (COM5)S31S30S29S28S27S26S25S24S23S22S21S20S19S18S17S16S15S14S13S12S11S10S09S08S07S06S05S04S03S02S01S00
00000000000000000000000000000000
0x40LCD_RAM (COM5)Reserved

Table 78. LCD register map and reset values (continued)

OffsetRegister313029282726252423222120191817161514131211109876543210
0x44LCD_RAM
(COM6)
S31S30S29S28S27S26S25S24S23S22S21S20S19S18S17S16S15S14S13S12S11S10S09S08S07S06S05S04S03S02S01S00
00000000000000000000000000000000
0x48LCD_RAM
(COM7)
Reserved
0x4CLCD_RAM
(COM6)
S31S30S29S28S27S26S25S24S23S22S21S20S19S18S17S16S15S14S13S12S11S10S09S08S07S06S05S04S03S02S01S00
00000000000000000000000000000000
0x50LCD_RAM
(COM7)
Reserved

Refer to Table 5 on page 47 for the Register boundary addresses table.