This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:software:homelab:library:module:lcd_alphanumeric [2010/02/08 14:40] – Page moved from en:software:library:module:lcd_alphanumeric to en:software:homelab:library:module:lcd_alphanumeric mikk.leini | en:software:homelab:library:module:lcd_alphanumeric [2020/07/20 12:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== |
| - | //Seotud mooduliga: [HW] [[en: | + | //Related to: [HW] [[en: |
| - | See teegi osa sisaldab kodulabori alfabeetilise | + | This library contains functions to use the HomeLab alphanumeric |
| - | ===== Andmetüübid | + | ===== Data Types ===== |
| - | * **// | + | * **// |
| - | * // | + | * // |
| - | * // | + | * // |
| - | * // | + | * // |
| - | * // | + | * // |
| - | ===== Funktsioonid | + | ===== Functions |
| - | * **//void lcd_alpha_init(lcd_alpha_mode disp_attr)// | + | * **//void lcd_alpha_init(lcd_alpha_mode disp_attr)// |
| - | * // | + | Initializes LCD. Parameters: |
| + | * // | ||
| - | * **//void lcd_alpha_clear(void)// | + | * **//void lcd_alpha_clear(void)// |
| + | Clears the whole display. Cursor is moved to the beginning of the first line. | ||
| - | * **//void lcd_alpha_clear_line(unsigned char line)//** \\ Ekraani ühe rea tühjendamine. Kursor viiakse pärast tühjendamist tühjendatud rea algusesse. Parameetrid: | + | * **//void lcd_alpha_clear_line(unsigned char line)//** \\ |
| - | * //line// - Rea number. | + | Clears a line on display. Cursor is moved to the beginning of cleared line. Parameters: |
| + | * //line// - Line number. 0 or 1. | ||
| - | * **//void lcd_alpha_home(void)// | + | * **//void lcd_alpha_home(void)// |
| - | * **//void lcd_alpha_goto_xy(unsigned char x, unsigned char y)//** - Kursori soovitud positsioonile viimine. Parameetrid: | + | |
| - | * //x// - X koordinaat (veeru number). Väärtus 0 kuni 15. | + | |
| - | | + | |
| - | * **// | + | * **// |
| - | * //c// - ASCII sümbol. | + | Moves cursor to the desired position. Parameters. |
| + | * //x// - X coordinate (column number). 0 to 15. | ||
| + | * //y// - Y coordinate (line number). 0 to 1. | ||
| - | * **// | + | * **// |
| - | * //s// - Teksti viit. | + | Writes a character to the cursor position. Parameters: |
| + | * //c// - ASCII character. | ||
| - | * **// | + | * **// |
| - | * //progmem_s// - Viit tekstile programmimälus. | + | Writes a string to the display starting from the position of the cursor. Parameters: |
| + | * //s// - Pointer to string (char array). | ||
| - | ===== Näide | + | * **//void lcd_alpha_write_string_p(const char *progmem_s)// |
| + | Writes a string from program memory to the display starting from the position of the cursor. Parameters | ||
| + | * // | ||
| + | |||
| + | ===== Example | ||
| + | |||
| + | Demonstration of how to use alphanumeric LCD to display text. | ||
| <code c> | <code c> | ||
| Line 44: | Line 55: | ||
| int main(void) | int main(void) | ||
| { | { | ||
| - | // Ekraani seadistamine | + | // LCD initialization. |
| lcd_alpha_init(LCD_ALPHA_DISP_ON); | lcd_alpha_init(LCD_ALPHA_DISP_ON); | ||
| - | // LCD ekraani puhastamine | + | // Display clearing. |
| lcd_alpha_clear(); | lcd_alpha_clear(); | ||
| - | // Kursori (nähtamatu) teise rea algusesse viimine | + | // Cursor to the beginning of second line. |
| lcd_alpha_goto_xy(0, | lcd_alpha_goto_xy(0, | ||
| - | // Teksti kuvamine | + | // Text displaying. |
| - | lcd_alpha_write_string(" | + | lcd_alpha_write_string(" |
| } | } | ||
| </ | </ | ||