LCD (H)
LCD (H)
LCD (H)
com
//
//
// THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
/***************************************/
/* LCD routines for OLIMEX LPC-MT-2106 */
/* 16x2 Character LCD 1602K */
/* 4-bit mode operation */
/***************************************/
/* DEFINE IOMASK */
#define LCD_D4 0x10 //P0.04
#define LCD_D5 0x20 //P0.05
#define LCD_D6 0x40 //P0.06
#define LCD_D7 0x80 //P0.07
#define LCD_EN 0x400000 //P0.22
#define LCD_RS 0x800000 //P0.23
#define LCD_RW 0x1000000 //P0.24
/* Functions Header */
/* internal I/O functions */
#define lcd_rs_set() IOSET |= LCD_RS
#define lcd_rs_clr() IOCLR |= LCD_RS
#define lcd_en_set() IOSET |= LCD_EN
#define lcd_en_clr() IOCLR |= LCD_EN
#define lcd_rw_set() IOSET |= LCD_RW
#define lcd_rw_clr() IOCLR |= LCD_RW