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 #48 background imageLoading...
Page #48 background image
{
bool temp = FALSE;
temp = (0x01 & (lcd_data >> bit_pos));
switch(temp)
{
case TRUE:
{
GPIO_WriteHigh(LCD_PORT, pin_num);
break;
}
default:
{
GPIO_WriteLow(LCD_PORT, pin_num);
break;
}
}
}
main.c
#include "STM8S.h"
#include "lcd.h"
void clock_setup(void);
void GPIO_setup(void);
void main(void)
{
const char txt1[] = {"MICROARENA"};
const char txt2[] = {"SShahryiar"};
const char txt3[] = {"STM8S003K"};
const char txt4[] = {"Discovery"};
unsigned char s = 0x00;
clock_setup();
GPIO_setup();
LCD_init();
LCD_clear_home();
LCD_goto(3, 0);
LCD_putstr(txt1);
LCD_goto(3, 1);
LCD_putstr(txt2);
delay_ms(4000);
LCD_clear_home();
for(s = 0; s < 9; s++)
{
LCD_goto((3 + s), 0);
LCD_putchar(txt3[s]);
delay_ms(90);
}
for(s = 0; s < 9; s++)
{
LCD_goto((3 + s), 1);
LCD_putchar(txt4[s]);

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