/* *************** LCD12.H ****************************** LCD Display (HD44780) on PortH, PORTJ ground = pin 1 Vss power = pin 2 Vdd +5V 10Kpot = pin 3 Vlc contrast adjust 0 to +5V PJ2 = pin 6 E (enable) PJ1 = pin 5 R/W (1 for read, 0 for write) PJ0 = pin 4 RS (1 for data, 0 for control/status) PH0-7 = pins7-14 DB0-7 (8 bit data)*/ // Last modified 1/3/03 by Jonathan W. Valvano // Copyright 2003 by Jonathan W. Valvano, valvano@uts.cc.utexas.edu // You may use, edit, run or distribute this file // as long as the above copyright notice remains // Initialize the LCD to // Increment address, No displayshift, Display on, // Cursor off, Blink off, Cursormove, Shift right // 8 bit, 1 line, 5 by 7dots void LCD_Init(void); // output a single ASCII character to LCD void LCD_OutChar(char letter); // Clear the LCD screen void LCD_Clear(void); // Output String (NULL termination) void LCD_OutString(char *pt); // change the LCD display mode void LCD_OutCsr(char command); /* Entry Mode Set 0,0,0,0,0,1,I/D,S I/D=1 for increment cursor move direction =0 for decrement cursor move direction S =1 for display shift =0 for no display shift Display On/Off Control 0,0,0,0,1,D,C,B D =1 for display on =0 for display off C =1 for cursor on =0 for cursor off B =1 for blink of cursor position character =0 for no blink Cursor/Display Shift 0,0,0,1,S/C,R/L,*,* S/C=1 for display shift =0 for cursor movement R/L=1 for shift to left =0 for shift to right Function Set 0,0,1,DL,N,F,*,* DL=1 for 8 bit =0 for 4 bit N =1 for 2 lines =0 for 1 line F =1 for 5 by 10 dots =0 for 5 by 7 dots */