This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:examples:digi:lcd [2009/03/25 06:43] – raivo.sell | en:examples:digi:lcd [2010/02/04 12:28] (current) – removed mikk.leini | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== LCD display ====== | ||
| - | {{: | ||
| - | |||
| - | LCD is used to display information to user. The Home-Lab is equipped with standard 2x16 alphanumeric HD44780-based LCD ({{: | ||
| - | LCD can be controller 4-bit or memory-mapped mode. Following examples are using 4-bit mode. LCD data bits are connectet to PORTA. | ||
| - | |||
| - | {{: | ||
| - | |||
| - | Example code here use Peter Fleury LCD driver. | ||
| - | |||
| - | ===== Header files ===== | ||
| - | |||
| - | * {{: | ||
| - | * {{: | ||
| - | |||
| - | ===== Example===== | ||
| - | |||
| - | <code c> | ||
| - | #include < | ||
| - | #include < | ||
| - | #include < | ||
| - | |||
| - | #include " | ||
| - | |||
| - | /*PS for Distance Lab use: | ||
| - | #include < | ||
| - | #include < | ||
| - | */ | ||
| - | |||
| - | int main(void) | ||
| - | { | ||
| - | // Initialize display, cursor off | ||
| - | lcd_init(LCD_DISP_ON); | ||
| - | |||
| - | // Clear display and home cursor | ||
| - | lcd_clrscr(); | ||
| - | | ||
| - | // Put string to display (line 1) with linefeed | ||
| - | lcd_puts(" | ||
| - | } | ||
| - | </ | ||
| - | |||
| - | |||
| - | ===== External links ===== | ||
| - | [[http:// | ||
| - | |||
| - | [[http:// | ||