Aguijón Software Libraries
1.0
Documentation for the included Libraries
Main Page
Files
File List
Globals
All
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
definitions.h
Go to the documentation of this file.
1
//definitions.h
2
4
#define FCY 2000000
5
#include <libpic30.h>
7
#define delayms(x) __delay_ms(x);
8
9
#define TRUE 1
10
#define FALSE 0
11
13
#define ON 0
14
15
#define OFF 1
16
18
#define I2C_HW
19
20
#define RST LATDbits.LATD11
21
22
#define SCL LATDbits.LATD10
23
24
#define SDA LATDbits.LATD9
25
#define SCL_TRIS TRISDbits.TRISD10
26
#define SDA_TRIS TRISDbits.TRISD9
27
#define RST_TRIS TRISDbits.TRISD11
28
#define SDA_READ PORTDbits.RD9
29
//end of IIC definitions
30
31
/* UART definitions */
33
#define STX 2
34
35
#define ETX 13
36
38
#define RELAY 0x0A
39
40
#define OCOUT 0x0B
41
42
#define LEDPT 0x0C
43
44
#define BUZZ 0x0E
45
46
#define OII 0x1A
47
48
#define DIPSW 0x1B
49
50
#define PT10K 0x1C
51
52
53
/* input definitions */
55
#define OPTO1 PORTBbits.RB0
56
57
#define OPTO2 PORTBbits.RB1
58
59
#define OPTO3 PORTBbits.RB2
60
61
#define OPTO4 PORTBbits.RB3
62
63
//on board switches & DIP sw
65
#define SW1 PORTBbits.RB13
66
67
#define SW2 PORTBbits.RB12
68
69
#define SW3 PORTBbits.RB11
70
71
#define SW4 PORTBbits.RB10
72
74
#define DIP1_5 PORTBbits.RB10
75
76
#define DIP2_6 PORTBbits.RB11
77
78
#define DIP3_7 PORTBbits.RB12
79
80
#define DIP4_8 PORTBbits.RB13
81
83
#define DSWLSBE LATFbits.LATF1
84
85
#define DSWMSBE LATFbits.LATF0
86
88
#define DMSB 0
89
90
#define DLSB 1
91
92
#define DDIS 2
93
94
/* LCD*/
96
#define BLI4 800
97
98
#define BLI3 1600
99
100
#define BLI2 2400
101
102
#define BLI1 3040
103
//end of input definitions
104
105
/* output definitions */
106
#define RLY1 LATDbits.LATD7
107
#define RLY2 LATDbits.LATD6
108
#define RLY3 LATDbits.LATD5
109
#define RLY4 LATDbits.LATD4
110
111
#define OC1 LATDbits.LATD3
112
#define OC2 LATDbits.LATD2
113
#define OC3 LATDbits.LATD1
114
#define OC4 LATDbits.LATD0
115
116
#define LED1 LATEbits.LATE0
117
#define LED2 LATEbits.LATE1
118
#define LED3 LATEbits.LATE2
119
#define LED4 LATEbits.LATE3
120
#define LED5 LATEbits.LATE4
121
#define LED6 LATEbits.LATE5
122
#define LED7 LATEbits.LATE6
123
#define LED8 LATEbits.LATE7
124
125
#define BUZZER LATGbits.LATG7
126
127
128
//end of output definitions
129
Aguijon
Documented Software
Aguijon 3.0
definitions.h
Generated on Sat Nov 17 2012 19:00:33 for Aguijón Software Libraries by
1.8.2