35 lines
1.2 KiB
C
35 lines
1.2 KiB
C
/*******************************************************************/
|
|
// Defines
|
|
/*******************************************************************/
|
|
#define LCD_RS porta.0
|
|
#define LCD_EN porta.1
|
|
#define LCD_D0 porta.2
|
|
#define LCD_D1 porta.3
|
|
#define LCD_D2 porta.4
|
|
#define LCD_D3 porta.5
|
|
#define DISPLAY_COLS 16
|
|
|
|
#define LINE_1 0x00
|
|
#define LINE_2 0x40
|
|
#define LINE_3 0x10
|
|
#define LINE_4 0x50
|
|
#define CLEAR_DISP 0x01
|
|
#define ACTIVITY_SYMBOL 0xFF
|
|
#define DATA 1
|
|
#define CMD 0
|
|
|
|
/*******************************************************************/
|
|
// Functions
|
|
/*******************************************************************/
|
|
void lcd_init (void);
|
|
void lcd_setPosition (unsigned char cX);
|
|
void lcd_putChar (unsigned char cX, unsigned char cmd);
|
|
void lcd_pulseEnable (void);
|
|
void lcd_setData (unsigned char cX);
|
|
void lcd_cls (void);
|
|
void lcd_defineChar (unsigned char address, const unsigned char *pattern);
|
|
|
|
void lcd_putc (char ch);
|
|
void lcd_putd (int decimal);
|
|
void lcd_puts (const char *str);
|
|
void lcd_printf (const char *nate, int my_byte);
|