STM8L15x Standard Peripherals Drivers: stm8l15x_lcd.c File Reference

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

stm8l15x_lcd.c File Reference

This file provides firmware functions to manage the following functionalities of the LCD controller (LCD) peripheral:

  • Initialization and configuration
  • LCD RAM memory write
  • Interrupts and flags management.
More...
#include "stm8l15x_lcd.h"

Go to the source code of this file.

Functions

void LCD_BlinkConfig (LCD_BlinkMode_TypeDef LCD_BlinkMode, LCD_BlinkFrequency_TypeDef LCD_BlinkFrequency)
 Configures the LCD Blink mode and Blink frequency.
void LCD_ClearFlag (void)
 Clears the start of frame LCD flag.
void LCD_ClearITPendingBit (void)
 Clears the start of frame interrupt pending bits.
void LCD_Cmd (FunctionalState NewState)
 Enables or disables the LCD Controller.
void LCD_ContrastConfig (LCD_Contrast_TypeDef LCD_Contrast)
 Configures the LCD Contrast.
void LCD_DeadTimeConfig (LCD_DeadTime_TypeDef LCD_DeadTime)
 Configures the LCD dead time.
void LCD_DeInit (void)
 Deinitializes the LCD Controller registers to their default reset values.
FlagStatus LCD_GetFlagStatus (void)
 Checks whether the LCD start of new frame flag is set or not.
ITStatus LCD_GetITStatus (void)
 Checks whether the start of frame interrupt has occurred or not.
void LCD_HighDriveCmd (FunctionalState NewState)
 Enables or disables the low resistance divider.
void LCD_Init (LCD_Prescaler_TypeDef LCD_Prescaler, LCD_Divider_TypeDef LCD_Divider, LCD_Duty_TypeDef LCD_Duty, LCD_Bias_TypeDef LCD_Bias, LCD_VoltageSource_TypeDef LCD_VoltageSource)
 Initializes the LCD according to the specified parameters.
void LCD_ITConfig (FunctionalState NewState)
 Enables or disables the start of frame interrupt.
void LCD_PageSelect (LCD_PageSelection_TypeDef LCD_PageSelection)
 Select the LCD page where the data will be written.
void LCD_PortMaskConfig (LCD_PortMaskRegister_TypeDef LCD_PortMaskRegister, uint8_t LCD_Mask)
 Configures the LCD Port Mask.
void LCD_PulseOnDurationConfig (LCD_PulseOnDuration_TypeDef LCD_PulseOnDuration)
 Configures the LCD pulses on duration.
void LCD_WriteRAM (LCD_RAMRegister_TypeDef LCD_RAMRegister, uint8_t LCD_Data)
 Writes a word in the specific LCD RAM.

Detailed Description

This file provides firmware functions to manage the following functionalities of the LCD controller (LCD) peripheral:

  • Initialization and configuration
  • LCD RAM memory write
  • Interrupts and flags management.
Author:
MCD Application Team
Version:
V1.5.0
Date:
13-May-2011
  *      
  *          ===================================================================      
  *                                    LCD Clock
  *          ===================================================================    
  *          LCD has tow clock sources:
  *            - RTCCLK divided by 2 used to generate LCD frame rate
  *            - LCDCLK to used for LCD registers read/write access
  *                   
  *          To configure the RTCCLK/LCDCLK, proceed as follows:
  *            - Enable RTC clock using CLK_PeripheralClockConfig(CLK_Peripheral_RTC, ENABLE)
  *              function
  *            - Enable LCD clock using CLK_PeripheralClockConfig(CLK_Peripheral_LCD, ENABLE)
  *              function  
  *            - Select the RTC clock source using the CLK_RTCClockConfig() function.    
  *            
  *          ===================================================================      
  *                                  LCD and low power modes
  *          =================================================================== 
  *          The LCD remains active during Active-halt, Wait, Low power run and 
  *          Low power wait modes unless disabled
  *              
  *          ===================================================================
  *                                 How to use this driver
  *          =================================================================== 
  *          1. Enable RTC clock using CLK_PeripheralClockConfig(CLK_Peripheral_RTC, ENABLE) function 
  *            
  *          2. Enable LCD clock using CLK_PeripheralClockConfig(CLK_Peripheral_LCD, ENABLE) function
  *            
  *          3. Select the RTC clock source using the CLK_RTCClockConfig() function. 
  *          
  *          4. Configure the LCD prescaler, divider, duty, bias and voltage source
  *             using LCD_Init() function     
  *            
  *          5. Call the LCD_PortMaskConfig() function to assign the unused SEGx
  *             (segment) and COMx (common) pins as standard general purpose IOs
  *
  *          6. Optionally you can enable/configure:
  *              -  LCD High Drive using the LCD_HighDriveCmd() function
  *              -  LCD Pulse ON Duration using the LCD_PulseOnDurationConfig() function
  *              -  LCD Dead Time using the LCD_DeadTimeConfig() function  
  *              -  The LCD Blink mode and frequency using the LCD_BlinkConfig() function
  *              -  The LCD Contrast using the LCD_ContrastConfig() function  
  *
  *          7. Call the LCD_Cmd() to enable the LCD controller
  *          
  *          8. Write to the LCD RAM memory using the LCD_WriteRAM() function.
  *          
  *  
Attention:

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2011 STMicroelectronics

Definition in file stm8l15x_lcd.c.

STM8S Firmware Library: Overview

 

 

 

For complete documentation on STM8L15x 8-bit microcontrollers platform visit www.st.com