/****************************************************************************/
/**
* \file port_definitions.h
*
* \brief Port Settings (Definitions, Association)
*
* \author   Michael Skutek
* \date	    09.01.2010
* \version  0.8
*
* Platform:    AVR ATmega (tested on ATmega16)
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*
****************************************************************************/



#ifndef PORT_DEFINITIONS_H_INCLUDED
#define PORT_DEFINITIONS_H_INCLUDED





/******************************************
	\internal
	Pin Settings: LCD
*******************************************/

/******************************************************************************
	\internal
Typical LCD Pinout (WITHOUT WARRANTY - READ DOCUMENTATION!):

  Symbol              Pin No.         Description

    Vss                 1               Ground
    Vdd                 2               Supply Voltage for Logic
    Vo                  3               Supply Voltage for LCD
    RS                  4               Register Select (RS=0: Instruction
                                                         Register,
                                                         RS=1: Data Register)
    R/W                 5               Read/Write (R/W=0: write, R/W=1: read)
    E                   6               Enable
    D0 to D7          7 to 14           Bi-directional Data Bus
    BL-                15               Backlight supply terminal (Anode)
    BL+                16               Backlight supply terminal (Cathode)
******************************************************************************/


#define LCD_PORT                     PORTD          //!< Controller Port for LCD Output
#define LCD_DDR                       DDRD          //!< DDR Register of Controller Port for LCD Output
#define LCD_RS                         PD2          //!< Pin for RS (Register Select)
#define LCD_RW                         PD1          //!< Pin for R/W (Read/Write)
#define LCD_EN                         PD3          //!< Pin for E (Enable)

#define LCDBL_PORT                   PORTB          //!< Controller Port for Backlight Pin
#define LCDBL_DDR                     DDRB          //!< DDR Register of Controller Port for LCD Backlight
#define LCDBL_CTRL                     PB0          //!< Pin for Backlight

#define LCD_DB4                        PD4          //!< Pin for D4 (Data, Bit 4)
#define LCD_DB5                        PD5          //!< Pin for D5 (Data, Bit 5)
#define LCD_DB6                        PD6          //!< Pin for D6 (Data, Bit 6)
#define LCD_DB7                        PD7          //!< Pin for D7 (Data, Bit 7)



#endif // PORT_DEFINITIONS_H_INCLUDED
