ini
[aversive.git] / modules / devices / ihm / lcd / config / lcd_config.h
1 /*  
2  *  Copyright Droids Corporation, Microb Technology, Eirbot (2005)
3  * 
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  *
18  *  Revision : $Id: lcd_config.h,v 1.1.10.1 2006-11-26 21:06:05 zer0 Exp $
19  *
20  */
21
22 /* change these definitions to adapt setting */
23 // changed PIN in BIT to avoid confusion, don'use old version
24 #define LCD_PORT PORTC
25
26 /*  If the LCD module is a 1 line version with double addressing (8
27     chars by segment), you need to define LCD_LINES to 2 and
28     LCD_DOUBLE_ADDRESSING to 1. This is the case with for example
29     SAMSUNG LTN 211 - N01.
30 */
31
32 #define LCD_LINES           2     /* visible lines */
33 #define LCD_LINE_LENGTH  0x40     /* internal line length */
34 #define LCD_START_LINE1  0x00     /* DDRAM address of first char of line 1 */
35 #define LCD_START_LINE2  0x40     /* DDRAM address of first char of line 2 */
36 #define LCD_START_LINE3  0x14     /* DDRAM address of first char of line 3 */
37 #define LCD_START_LINE4  0x54     /* DDRAM address of first char of line 4 */
38
39 #define LCD_DOUBLE_ADDRESSING 1
40
41 #define LCD_DATA_PORT    LCD_PORT  /* port for 4bit data */
42 #define LCD_FIRST_DATA_BIT 3
43 #define LCD_RS_PORT      LCD_PORT  /* port for RS line */
44 #define LCD_RS_BIT       0
45 #define LCD_RW_PORT      LCD_PORT  /* port for RW line */
46 #define LCD_RW_BIT       1
47 #define LCD_E_PORT       LCD_PORT  /* port for Enable line */
48 #define LCD_E_BIT        2