Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:examples:digi:lcd [2009/06/03 23:18] raivo.sellen:examples:digi:lcd [2010/02/04 12:28] (current) – removed mikk.leini
Line 1: Line 1:
-====== Alphanumeric LCD display ====== 
- 
-LCD is used to display information to user. The HomeLab is equipped with standard 2x16 alphanumeric HD44780-based LCD ({{:examples:datasheets:lcd_wc1601a0.pdf|datasheet}}). 
-LCD can be controlled by 4-bit mode or memory-mapped mode. Following examples are using 4-bit mode. LCD data bits are connected to PORTA. 
- 
-LCD can connected directly to digital module (starting from V.3) or by using extension cable (all versions). 
- 
-2x16 LCD with backlight connected to Digital module v.3.1: 
- 
-{{:examples:study_lcd_cpu.jpg?500|}} 
- 
-1x16 LCD without backlight connected to Digital module v.2.2 with extension cable: 
- 
-{{:examples:digi:studyboard2.2_lcd.jpg?500|Studyboard v2.2}} 
- 
- 
-Both connection types have electrically identical wiring to AVR.\\ 
-  
-{{:examples:lcd_schema.jpg?500}} 
- 
-Example code here uses Peter Fleury LCD driver (see the external link below). 
-To use the LCD functions you need to include following files into your project. 
- 
-===== Header files ===== 
- 
-  * {{:et:naited:digi:lcd:lcd.c}} 
-  * {{:et:naited:digi:lcd:lcd.h|}} 
- 
-===== Example===== 
- 
-<code c> 
-#include <stdlib.h> 
-#include <avr/io.h> 
-#include <avr/pgmspace.h> 
- 
-#include "lcd.h" 
- 
-/*PS for Distance Lab use: 
-#include <util/lcd.h> 
-#include <util/lcd.c> 
-*/ 
- 
-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("LCD Test Line 1\n"); 
-} 
-</code> 
- 
-===== Graphical displays ===== 
-It is also possible to use low cost graphical LCD with AVR. Cheap way is to use old mobile phone LCD which can be found almost in every home. 
- 
-Following example uses Nokia 3310/5110 Graphical 84x84 LCD. The initial driver is written by Tony Myatt, 2007.  
- 
-<example will come soon> 
- 
-===== External links ===== 
-[[http://homepage.hispeed.ch/peterfleury/avr-lcd44780.html|Peter Fleury LCD example]] 
- 
-[[http://homepage.hispeed.ch/peterfleury/group__pfleury__lcd.html|LCD command reference]] 
- 
-[[http://www.quantumtorque.com/content/view/32/37/|Tony Myatt Nokia 3310 LCD driver]] 
  
en/examples/digi/lcd.1244071132.txt.gz · Last modified: 2020/07/20 09:00 (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0