void LCD_print(UArg food) { //Clear Screen //clear_screen(); //set DDRAM address (line 1 0x00) LCD_send(0,0x80); //send line send_line(buff1); //set DDRAM address (line 2= 0x40) LCD_send(0, 0xC0); //send line send_line(buff2); }
void send_line(char arr[]) { int i = 0; for(i=0; i<16 || arr[i] != 0; i++) { LCD_send(1,arr[i]); } }
int LCD_clear(void) { int i; for (i=0x80;i<0xD0;i++){ if (LCD_send(' ') == 0) return 0; } LCD_set_pos(0,0); return 1; }
int LCD_write(char* string) { //uint8_t buf[] = {0x00, line ? 0xC0 : 0x80}; while(*string != '\0') { int result = LCD_send(*string); if (result == 0) return(0); string++; } return(1); }
void LCD_init() { //function set (8 bit mode) LCD_send(0, 0x38); //Turn LCD on LCD_send(0, 0x0C); //Clear display LCD_send(0, 0x01); //Task_sleep(2); //Entry set mode LCD_send(0, 0x06); //cursor display shift LCD_send(0, 0x14); //Set DDRAM LCD_send(0, 0x80); LCD_send(1, 'H'); LCD_send(1, 'I'); }
void clear_screen() { LCD_send(0, 0x01); }
uint8 LCD_write(uint8 value) { LCD_send(value, Rs); return 0; }
void LCD_command(uint8 value) { LCD_send(value, 0); }
void LCD_send_1(u08 ch) { LCD_send(ch, 1); }
void LCD_send_0(u08 ch) { LCD_send(ch, 0); }