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: 2006-11-21 10:28:39 +0100 (Tue, 21 Nov 2006) $
8
 * By:              $LastChangedBy: johboh $
9
 * Revision:        $Revision: 140 $
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
 
140 johboh 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)
129 johboh 34
 
140 johboh 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
43
 
129 johboh 44
#endif //compiler.h