EasyManuals Logo

STMicroelectronics STM8 User Manual

STMicroelectronics STM8
126 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #47 background imageLoading...
Page #47 background image
break;
}
}
LCD_4bit_send(value);
}
void LCD_4bit_send(unsigned char lcd_data)
{
toggle_io(lcd_data, 7, LCD_DB7);
toggle_io(lcd_data, 6, LCD_DB6);
toggle_io(lcd_data, 5, LCD_DB5);
toggle_io(lcd_data, 4, LCD_DB4);
toggle_EN_pin();
toggle_io(lcd_data, 3, LCD_DB7);
toggle_io(lcd_data, 2, LCD_DB6);
toggle_io(lcd_data, 1, LCD_DB5);
toggle_io(lcd_data, 0, LCD_DB4);
toggle_EN_pin();
}
void LCD_putstr(char *lcd_string)
{
do
{
LCD_send(*lcd_string++, DAT);
}while(*lcd_string != '\0');
}
void LCD_putchar(char char_data)
{
LCD_send(char_data, DAT);
}
void LCD_clear_home(void)
{
LCD_send(clear_display, CMD);
LCD_send(goto_home, CMD);
}
void LCD_goto(unsigned char x_pos, unsigned char y_pos)
{
if(y_pos == 0)
{
LCD_send((0x80 | x_pos), CMD);
}
else
{
LCD_send((0x80 | 0x40 | x_pos), CMD);
}
}
void toggle_EN_pin(void)
{
GPIO_WriteHigh(LCD_PORT, LCD_EN);
delay_ms(2);
GPIO_WriteLow(LCD_PORT,LCD_EN);
}
void toggle_io(unsigned char lcd_data, unsigned char bit_pos, unsigned char pin_num)

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the STMicroelectronics STM8 and is the answer not in the manual?

STMicroelectronics STM8 Specifications

General IconGeneral
BrandSTMicroelectronics
ModelSTM8
CategoryMicrocontrollers
LanguageEnglish

Related product manuals