Real Time Clock Module with I2C Interface  0.3
⇒ back to Project Page
 All Data Structures Files Functions Variables Typedefs Macros Pages
port_definitions.h
Go to the documentation of this file.
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 #ifndef PORT_DEFINITIONS_H_INCLUDED
30 #define PORT_DEFINITIONS_H_INCLUDED
31 
32 
33 
34 
36 
37 // Symbol Pin No. Description
38 //
39 // Vss 1 Ground
40 // Vdd 2 Supply Voltage for Logic
41 // Vo 3 Supply Voltage for LCD
42 // RS 4 Register Select (RS=0: Instruction Register, RS=1: Data Register)
43 // R/W 5 Read/Write (R/W=0: write, R/W=1: read)
44 // E 6 Enable
45 // D0 to D7 7 to 14 Bi-directional Data Bus
46 // BL- 15 Backlight supply terminal (Anode)
47 // BL+ 16 Backlight supply terminal (Cathode)
48 
49 
50 
51 
53 
54 //LCD
55 #define LCD_PORT PORTD //Controller Port for LCD Output
56 #define LCD_DDR DDRD //DDR Register of Controller Port for LCD Output
57 #define LCD_RS PD0 //Pin for RS (Register Select)
58 #define LCD_RW PD1 //Pin for R/W (Read/Write)
59 //#define LCD_EN PD2 //Pin for E (Enable)
60 #define LCD_EN PD2 //Pin for E (Enable)
61 
62 //#define LCD_BACKLIGHT PD3 //Pin for Backlight
63 
64 //#define LCD_DB4 PD4 //Pin for D4 (Data, Bit 4)
65 //#define LCD_DB5 PD5 //Pin for D5 (Data, Bit 5)
66 //#define LCD_DB6 PD6 //Pin for D6 (Data, Bit 6)
67 //#define LCD_DB7 PD7 //Pin for D7 (Data, Bit 7)
68 
69 #define LCD_DB4 PD4 //Pin for D4 (Data, Bit 4)
70 #define LCD_DB5 PD5 //Pin for D5 (Data, Bit 5)
71 #define LCD_DB6 PD6 //Pin for D6 (Data, Bit 6)
72 #define LCD_DB7 PD7 //Pin for D7 (Data, Bit 7)
73 
74 #define LCDBL_PORT PORTD
75 #define LCDBL_DDR DDRD
76 #define LCDBL_CTRL PD3
77 
78 
79 //LED
80 #define DCF_LED_PORT PORTB
81 #define DCF_LED_DDR DDRB
82 #define DCF_LED_ADDR PB1
83 
84 
85 //Comparator (DCF77 Data)
86 #define COMP_PORT PORTC //PORTx of Port which is connected to the comparator
87 #define COMP_PIN PINC //PINx of Port which is connected to the comparator
88 #define COMP_DDR DDRC //DDR of Port which is connected to the comparator
89 #define COMP_DATA PC2 //used input pin for the comparator
90 
91 
92 //PON
93 #define PON_PORT PORTC //Port for PON signal to DCF77 module
94 #define PON_DDR DDRC //DDR of Port for PON signal to DCF77 module
95 #define PON_ADDR PC3 //Pin which is connected to PON signal of DCF77 module
96 
97 
98 //I2C
99 #define I2C_PORT PORTC //Port for I2C Bus
100 #define I2C_DDR DDRC //DDR of Port for I2C Bus
101 #define I2C_SDA_ADDR PC4 //Pin for SDA
102 #define I2C_SCL_ADDR PC5 //Pin for SCL
103 
104 
105 
106 
107 #endif // PORT_DEFINITIONS_H_INCLUDED