lcd.h DC PowerSupply

/**
******************************************************************************
* @file main.c
* @author hoangnv.3i@ggmail.com
* @version V1.0
* @date 19/5/2018
* @brief example1
******************************************************************************
**/

#ifndef _LCD16x2_H
#define _LCD16x2_H

#ifdef __cplusplus
extern “C” {
#endif
//———————————————–

#include “stm8s.h”

#define LCD_RS GPIO_PIN_4
#define LCD_RS_GPIO GPIOD

#define LCD_EN GPIO_PIN_5
#define LCD_EN_GPIO GPIOD

#define LCD_D4 GPIO_PIN_4
#define LCD_D4_GPIO GPIOC

#define LCD_D5 GPIO_PIN_5
#define LCD_D5_GPIO GPIOC

#define LCD_D6 GPIO_PIN_6
#define LCD_D6_GPIO GPIOC

#define LCD_D7 GPIO_PIN_7
#define LCD_D7_GPIO GPIOC

//————————————
void lcd_init(void);
void LCD_STROBE(void);
void LCD_DATA(u8 cX );
void lcd_write(u8 c);
void lcd_clear(void);
void lcd_putchar(u8 c);
void lcd_puts(char *c);
void lcd_gotoxy(u8 row,u8 col);

void LCD_Delay_US(uint8_t num);

//————————————————————————————
#ifdef __cplusplus
}
#endif

#endif

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *