STM8L152驱动LCD像素点闪烁

2019-07-14 21:34发布

最近在做用STM8L152驱动段式LCD,该IC有专用的LCD接口,可以实现显示,但是在实现段位闪烁的地方卡住了,以下是库函数:

/**
  * @brief  Configures the LCD Blink mode and Blink frequency.
  * @param  LCD_BlinkMode: specifies the LCD blink mode.
  *          This parameter can be one of the following values:
  *            @arg LCD_BlinkMode_Off:           Blink disabled
  *            @arg LCD_BlinkMode_SEG0_COM0:     Blink enabled on SEG[0], COM[0] (1 pixel)
  *            @arg LCD_BlinkMode_SEG0_AllCOM:   Blink enabled on SEG[0], all COM (up to 8
  *                                       pixels according to the programmed duty)
  *            @arg LCD_BlinkMode_AllSEG_AllCOM: Blink enabled on all SEG and all COM
  *                                       (all pixels)
  * @param  LCD_BlinkFrequency: specifies the LCD blink frequency.
  *          This parameter can be one of the following values:
  *            @arg LCD_BlinkFrequency_Div8:    The Blink frequency = fLcd/8
  *            @arg LCD_BlinkFrequency_Div16:   The Blink frequency = fLcd/16
  *            @arg LCD_BlinkFrequency_Div32:   The Blink frequency = fLcd/32
  *            @arg LCD_BlinkFrequency_Div64:   The Blink frequency = fLcd/64
  *            @arg LCD_BlinkFrequency_Div128:  The Blink frequency = fLcd/128
  *            @arg LCD_BlinkFrequency_Div256:  The Blink frequency = fLcd/256
  *            @arg LCD_BlinkFrequency_Div512:  The Blink frequency = fLcd/512
  *            @arg LCD_BlinkFrequency_Div1024: The Blink frequency = fLcd/1024
  * @retval None
  */
void LCD_BlinkConfig(LCD_BlinkMode_TypeDef LCD_BlinkMode, LCD_BlinkFrequency_TypeDef LCD_BlinkFrequency)
{
  /* Check function parameters */
  assert_param(IS_LCD_BLINK_MODE(LCD_BlinkMode));
  assert_param(IS_LCD_BLINK_FREQUENCY(LCD_BlinkFrequency));
  LCD->CR1 &= (uint8_t)(~LCD_CR1_BLINK); /* Clear the blink mode bits */
  LCD->CR1 |= LCD_BlinkMode; /* Config the LCD Blink Mode */
  LCD->CR1 &= (uint8_t)(~LCD_CR1_BLINKF); /* Clear the blink frequency bits */
  LCD->CR1 |= LCD_BlinkFrequency; /* Config the LCD Blink Frequency */
}

配置段位闪烁(就是电子表中间那两个小点的类似闪烁),因为每一段都要设置,设置的时候要求它闪烁,但是这个函数只能配置4种状态,全开全关,COM0-SEG0,SEG0-所有COM口,不能实现任意像素点闪烁吗?比如要要求COM3-SEG7这个段位闪烁?怎么显示,有没有大神操作过?
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。