Hello , I'm trying to interface a 16x1 lcd with the stm8. My code is as follows:
(I'm using the 16MHz internal clock)
After this initialization , I'm not getting how to send string data to display on the lcd. Where should i write the data to get the display on lcd.
Thanks.
(I'm using the 16MHz internal clock)
C:
# include "stm8l.h"
# include "stm8s.h"
void lcdinit(void)
{
LCD_CR1 = 0x06;
LCD_CR2 = 0xEE;
LCD_FRQ = 0X30;
LCD_PM0 = 0x92;
LCD_PM1 = 0x00;
LCD_PM2 = 0xB0;
LCD_PM3 = 0x04;
LCD_RAM0 = 0xFF;
LCD_RAM1 = 0xFF;
LCD_RAM2 = 0xFF;
LCD_RAM3 = 0xFF;
LCD_RAM4 = 0xFF;
LCD_RAM5 = 0xFF;
LCD_RAM6 = 0xFF;
LCD_RAM7 = 0xFF;
LCD_RAM8 = 0xFF;
LCD_RAM9 = 0xFF;
LCD_RAM10 = 0xFF;
LCD_RAM11 = 0xFF;
LCD_RAM12 = 0xFF;
LCD_RAM13 = 0xFF;
LCD_CR3 = 0x40;
PB_DDR = 0x10;
PB_CR1 = 0x10;
}
Thanks.
Last edited by a moderator: