35 lines
No EOL
632 B
C
35 lines
No EOL
632 B
C
/*
|
|
* lcd.h
|
|
*
|
|
* Created: 17/05/2021 12:11:26
|
|
* Author: yboujon1
|
|
*/
|
|
|
|
#include "main.h"
|
|
|
|
#define RS PC2
|
|
#define RW PC1
|
|
#define E PC0
|
|
|
|
#define FUNCTION_SET 0x30
|
|
#define TWO_LINE_MODE 0x08
|
|
#define DOTS_MODE 0x04
|
|
|
|
#define DISPLAY_CTRL 0x08
|
|
#define DISPLAY_ON 0x04
|
|
#define CURSOR_ON 0x02
|
|
#define BLINK_ON 0x01
|
|
|
|
#define CLEAR_DISPLAY 0x01
|
|
|
|
#define ENTRY_MODE_SET 0x04
|
|
#define INCREMENT_MODE 0x02
|
|
#define ENTIRE_SHIFT_ON 0x01
|
|
|
|
#define FIRST_LINE 0x80
|
|
#define SECOND_LINE 0xC0
|
|
|
|
void LCD_Init (void);
|
|
void LCD_Command(unsigned char cmd);
|
|
int LCD_putchar(char c, FILE *stream);
|
|
void LCD_placing(char c); |