![]() |
Interface for Dot-Matrix LCDs 0.8
|
|
⇒ back to Project Page |
00001 /****************************************************************************/ 00032 #ifndef PORT_DEFINITIONS_H_INCLUDED 00033 #define PORT_DEFINITIONS_H_INCLUDED 00034 00035 00036 00037 00038 00039 /****************************************** 00040 \internal 00041 Pin Settings: LCD 00042 *******************************************/ 00043 00044 /****************************************************************************** 00045 \internal 00046 Typical LCD Pinout (WITHOUT WARRANTY - READ DOCUMENTATION!): 00047 00048 Symbol Pin No. Description 00049 00050 Vss 1 Ground 00051 Vdd 2 Supply Voltage for Logic 00052 Vo 3 Supply Voltage for LCD 00053 RS 4 Register Select (RS=0: Instruction 00054 Register, 00055 RS=1: Data Register) 00056 R/W 5 Read/Write (R/W=0: write, R/W=1: read) 00057 E 6 Enable 00058 D0 to D7 7 to 14 Bi-directional Data Bus 00059 BL- 15 Backlight supply terminal (Anode) 00060 BL+ 16 Backlight supply terminal (Cathode) 00061 ******************************************************************************/ 00062 00063 00064 #define LCD_PORT PORTD //!< Controller Port for LCD Output 00065 #define LCD_DDR DDRD //!< DDR Register of Controller Port for LCD Output 00066 #define LCD_RS PD2 //!< Pin for RS (Register Select) 00067 #define LCD_RW PD1 //!< Pin for R/W (Read/Write) 00068 #define LCD_EN PD3 //!< Pin for E (Enable) 00069 00070 #define LCDBL_PORT PORTB //!< Controller Port for Backlight Pin 00071 #define LCDBL_DDR DDRB //!< DDR Register of Controller Port for LCD Backlight 00072 #define LCDBL_CTRL PB0 //!< Pin for Backlight 00073 00074 #define LCD_DB4 PD4 //!< Pin for D4 (Data, Bit 4) 00075 #define LCD_DB5 PD5 //!< Pin for D5 (Data, Bit 5) 00076 #define LCD_DB6 PD6 //!< Pin for D6 (Data, Bit 6) 00077 #define LCD_DB7 PD7 //!< Pin for D7 (Data, Bit 7) 00078 00079 00080 00081 #endif // PORT_DEFINITIONS_H_INCLUDED