Subversion Repositories HomeAutomation

Rev

Details | Last modification | View Log | SVN | RSS feed

Rev Author Line No. Line
129 johboh 1
/*********************************************************************
2
 *
3
 *                  Compiler specifics like clockspeed and portIOs.
4
 *
5
 *********************************************************************
6
 * FileName:        $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/canLCD/Include/compiler.h $
7
 * Last changed:    $LastChangedDate: 2007-03-04 12:01:27 +0100 (Sun, 04 Mar 2007) $
8
 * By:              $LastChangedBy: johboh $
9
 * Revision:        $Revision: 357 $
10
 ********************************************************************/
11
 
12
#ifndef COMPILER_H
13
#define COMPILER_H
14
 
15
#include <p18cxxx.h>
16
#define CLOCK_FREQ      (40000000)      // Hz
17
#define INSTR_FREQ          (CLOCK_FREQ/4)
18
#define CLOCK_FOSC      (40)      // MHz
140 johboh 19
#define NUM_CYK_1us     10
20
#define NUM_CYK_1ms     10000
129 johboh 21
 
22
#define LED0_TRIS       (TRISCbits.TRISC1)
23
#define LED0_IO         (PORTCbits.RC1)
24
 
357 johboh 25
// GLCD
26
#define GLCD_CS_TRIS (PORTCbits.RC0)
27
#define GLCD_CS_IO  (TRISCbits.TRISC0)
28
#define GLCD_RES_TRIS (PORTCbits.RC1)
29
#define GLCD_RES_IO     (TRISCbits.TRISC1)
30
#define GLCD_A0_TRIS (PORTCbits.RC2)
31
#define GLCD_A0_IO  (TRISCbits.TRISC2)
32
#define GLCD_SCL_TRIS (PORTCbits.RC3)
33
#define GLCD_SCL_IO     (TRISCbits.TRISC3)
34
#define GLCD_SI_TRIS (PORTCbits.RC5)
35
#define GLCD_SI_IO  (TRISCbits.TRISC5)
36
 
140 johboh 37
// LCD
357 johboh 38
/*
140 johboh 39
#define LCD_DATA_4_TRIS (PORTCbits.RC0)
40
#define LCD_DATA_4_IO   (TRISCbits.TRISC0)
41
#define LCD_DATA_5_TRIS (PORTCbits.RC1)
42
#define LCD_DATA_5_IO   (TRISCbits.TRISC1)
43
#define LCD_DATA_6_TRIS (PORTCbits.RC2)
44
#define LCD_DATA_6_IO   (TRISCbits.TRISC2)
45
#define LCD_DATA_7_TRIS (PORTCbits.RC3)
46
#define LCD_DATA_7_IO   (TRISCbits.TRISC3)
129 johboh 47
 
140 johboh 48
#define LCD_RS_TRIS (PORTAbits.RA4)
49
#define LCD_RS_IO   (TRISAbits.TRISA4)
50
#define LCD_EN_TRIS (PORTAbits.RA5)
51
#define LCD_EN_IO   (TRISAbits.TRISA5)
52
 
53
#define LCD_LINE1 0
54
#define LCD_LINE2 40
55
#define LCD_LINE_LENGTH 24
357 johboh 56
*/
140 johboh 57
 
357 johboh 58
#define APP_VERSION 0x0002
59
 
60
 
129 johboh 61
#endif //compiler.h