Subversion Repositories group.electronics

Rev

Rev 49 | Rev 52 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 49 Rev 51
Line 38... Line 38...
38
 
38
 
39
	lcd_home();
39
	lcd_home();
40
	_delay_ms(10);
40
	_delay_ms(10);
41
}
41
}
42
 
42
 
43
void lcd_pergraph(uint8_t val, uint8_t row, uint8_t col) {
43
void lcd_pergraph(uint8_t val, uint8_t col, uint8_t row) {
44
	uint8_t i = 0;
44
	uint8_t i = 0;
45
	uint8_t c = val / 10;	
45
	uint8_t c = val / 10;	
46
	lcd_setCursor(row, col);
46
	lcd_setCursor(col, row);
47
	for (i = 0; i<=10; i++) {
47
	for (i = 0; i<10; i++) {
48
		if (i <= c)
48
		if (i < c)
49
			lcd_char(0xff);
49
			lcd_char(0xff);
50
		else
50
		else
51
			lcd_char(0x00);
51
			lcd_char(0x00);
52
	}
52
	}
53
}
53
}
Line 90... Line 90...
90
	lcd_command(LCD_SETDDRAMADDR | ((col - 1)+ row_offsets[row]));
90
	lcd_command(LCD_SETDDRAMADDR | ((col - 1)+ row_offsets[row]));
91
}
91
}
92
 
92
 
93
void lcd_overprint(char * str, uint8_t len, uint8_t col, uint8_t row) {
93
void lcd_overprint(char * str, uint8_t len, uint8_t col, uint8_t row) {
94
	uint8_t i = 0;
94
	uint8_t i = 0;
95
	for (i=0; i<=len; i++)
-
 
96
		lcd_char(0x20);	
-
 
97
 
-
 
98
	lcd_setCursor(row, col);
95
	lcd_setCursor(col, row);
99
 
-
 
100
	uint8_t size = lcd_print(str);
96
	uint8_t size = lcd_print(str);
101
	for (i=size; i<=len; i++)
97
	for (i=size; i<len; i++)
102
		lcd_char(0x20);	
98
		lcd_char(0x20);	
103
}
99
}
104
 
100
 
105
/** End helpers **/
101
/** End helpers **/
106
 
102