Subversion Repositories HomeAutomation

Rev

Rev 129 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 129 Rev 140
Line 2... Line 2...
2
 *
2
 *
3
 *                  Compiler specifics like clockspeed and portIOs.
3
 *                  Compiler specifics like clockspeed and portIOs.
4
 *
4
 *
5
 *********************************************************************
5
 *********************************************************************
6
 * FileName:        $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/canLCD/Include/compiler.h $
6
 * FileName:        $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/canLCD/Include/compiler.h $
7
 * Last changed:    $LastChangedDate: 2006-11-20 17:54:03 +0100 (Mon, 20 Nov 2006) $
7
 * Last changed:    $LastChangedDate: 2006-11-21 10:28:39 +0100 (Tue, 21 Nov 2006) $
8
 * By:              $LastChangedBy: johboh $
8
 * By:              $LastChangedBy: johboh $
9
 * Revision:        $Revision: 129 $
9
 * Revision:        $Revision: 140 $
10
 ********************************************************************/
10
 ********************************************************************/
11
 
11
 
12
#ifndef COMPILER_H
12
#ifndef COMPILER_H
13
#define COMPILER_H
13
#define COMPILER_H
14
 
14
 
15
#include <p18cxxx.h>
15
#include <p18cxxx.h>
16
#define CLOCK_FREQ      (40000000)      // Hz
16
#define CLOCK_FREQ      (40000000)      // Hz
17
#define INSTR_FREQ          (CLOCK_FREQ/4)
17
#define INSTR_FREQ          (CLOCK_FREQ/4)
18
#define CLOCK_FOSC      (40)      // MHz
18
#define CLOCK_FOSC      (40)      // MHz
-
 
19
#define NUM_CYK_1us     10
-
 
20
#define NUM_CYK_1ms     10000
19
 
21
 
20
#define LED0_TRIS       (TRISCbits.TRISC1)
22
#define LED0_TRIS       (TRISCbits.TRISC1)
21
#define LED0_IO         (PORTCbits.RC1)
23
#define LED0_IO         (PORTCbits.RC1)
22
 
24
 
-
 
25
// LCD
-
 
26
#define LCD_DATA_4_TRIS (PORTCbits.RC0)
-
 
27
#define LCD_DATA_4_IO   (TRISCbits.TRISC0)
-
 
28
#define LCD_DATA_5_TRIS (PORTCbits.RC1)
-
 
29
#define LCD_DATA_5_IO   (TRISCbits.TRISC1)
-
 
30
#define LCD_DATA_6_TRIS (PORTCbits.RC2)
-
 
31
#define LCD_DATA_6_IO   (TRISCbits.TRISC2)
-
 
32
#define LCD_DATA_7_TRIS (PORTCbits.RC3)
-
 
33
#define LCD_DATA_7_IO   (TRISCbits.TRISC3)
-
 
34
 
-
 
35
#define LCD_RS_TRIS (PORTAbits.RA4)
-
 
36
#define LCD_RS_IO   (TRISAbits.TRISA4)
-
 
37
#define LCD_EN_TRIS (PORTAbits.RA5)
-
 
38
#define LCD_EN_IO   (TRISAbits.TRISA5)
-
 
39
 
-
 
40
#define LCD_LINE1 0
-
 
41
#define LCD_LINE2 40
-
 
42
#define LCD_LINE_LENGTH 24
23
 
43
 
24
#endif //compiler.h
44
#endif //compiler.h