ProtoVoltaics RTD Shield with RS232 and RS485 Transceivers  Version 8
 All Classes Functions Variables Pages
PV_RTD_RS232_RS485_Memory_Map.h
1 #ifndef PV_RTD_MEMORY_MAP
2 #define PV_RTD_MEMORY_MAP
3 
4 #define RS232_CONFIG_ADDRESS 0
5 #define UART_POLARITY_BIT 0b00010000 // Set to be same value expected by OpenUART in PIC24F Peripheral Library
6 #define UART_PARITY_DATA_BITS 0b00000110 // Set to be same value expected by OpenUART in PIC24F Peripheral Library
7 #define UART_STOP_BIT 0b00000001 // Set to be same value expected by OpenUART in PIC24F Peripheral Library
8 #define RS232_BAUD_MSB_ADDRESS 1
9 #define RS232_BAUD_CSB_ADDRESS 2
10 #define RS232_BAUD_LSB_ADDRESS 3
11 #define RS485_CONFIG_ADDRESS 4
12 #define RS485_BAUD_MSB_ADDRESS 5
13 #define RS485_BAUD_CSB_ADDRESS 6
14 #define RS485_BAUD_LSB_ADDRESS 7
15 #define RTD_2W_ENABLE_ADDRESS 8
16 #define RTD_2W_CH1_ENABLE_BIT 0b00000001
17 #define RTD_2W_CH2_ENABLE_BIT 0b00000010
18 #define RTD_2W_CH3_ENABLE_BIT 0b00000100
19 #define RTD_2W_CH4_ENABLE_BIT 0b00001000
20 #define RTD_2W_CH5_ENABLE_BIT 0b00010000
21 #define RTD_2W_CH6_ENABLE_BIT 0b00100000
22 #define RTD_2W_CH7_ENABLE_BIT 0b01000000
23 #define RTD_3W_4W_ENABLE_ADDRESS 9
24 #define RTD_3W_CH1_ENABLE_BIT 0b00000001
25 #define RTD_3W_CH2_ENABLE_BIT 0b00000010
26 #define RTD_3W_CH3_ENABLE_BIT 0b00000100
27 #define RTD_3W_CH4_ENABLE_BIT 0b00001000
28 #define RTD_4W_CH1_ENABLE_BIT 0b00010000
29 #define RTD_4W_CH2_ENABLE_BIT 0b00100000
30 #define RTD_4W_CH3_ENABLE_BIT 0b01000000
31 #define RTD_3W_BITS 0b00001111
32 #define RTD_4W_BITS 0b01110000
33 #define RTD_SPS_ADDRESS 10
34 #define RTD_2W_CH1_IDAC_PGA_ADDRESS 11
35 #define RTD_2W_CH2_IDAC_PGA_ADDRESS 12
36 #define RTD_2W_CH3_IDAC_PGA_ADDRESS 13
37 #define RTD_2W_CH4_IDAC_PGA_ADDRESS 14
38 #define RTD_2W_CH5_IDAC_PGA_ADDRESS 15
39 #define RTD_2W_CH6_IDAC_PGA_ADDRESS 16
40 #define RTD_2W_CH7_IDAC_PGA_ADDRESS 17
41 #define RTD_3W_CH1_IDAC_PGA_ADDRESS 18
42 #define RTD_3W_CH2_IDAC_PGA_ADDRESS 19
43 #define RTD_3W_CH3_IDAC_PGA_ADDRESS 20
44 #define RTD_3W_CH4_IDAC_PGA_ADDRESS 21
45 #define RTD_4W_CH1_IDAC_PGA_ADDRESS 22
46 #define RTD_4W_CH2_IDAC_PGA_ADDRESS 23
47 #define RTD_4W_CH3_IDAC_PGA_ADDRESS 24
48 #define RTD_IDAC_BITS 0b00000111
49 #define RTD_PGA_BITS 0b01110000
50 #define IRQ_ENABLE_ADDRESS 25
51 #define IRQ1_ENABLE_BIT 0b00000001
52 #define IRQ2_ENABLE_BIT 0b00000010
53 #define IRQ3_ENABLE_BIT 0b00000100
54 #define IRQ4_ENABLE_BIT 0b00001000
55 #define IRQ1_RTD_ALARM_ENABLE_BIT 0b00010000
56 #define IRQ2_RTD_ALARM_ENABLE_BIT 0b00100000
57 #define IRQ3_RTD_ALARM_ENABLE_BIT 0b01000000
58 #define IRQ4_RTD_ALARM_ENABLE_BIT 0b10000000
59 #define IRQ1_CONFIG_ADDRESS 26
60 #define IRQ2_CONFIG_ADDRESS 27
61 #define IRQ3_CONFIG_ADDRESS 28
62 #define IRQ4_CONFIG_ADDRESS 29
63 #define RS232_IRQ_BIT 0b00100000
64 #define RS485_IRQ_BIT 0b00010000
65 #define RTD_2W_CH1_HI_LIMIT_MSB_ADDRESS 30
66 #define RTD_2W_CH1_HI_LIMIT_CSB_ADDRESS 31
67 #define RTD_2W_CH1_HI_LIMIT_LSB_ADDRESS 32
68 #define RTD_2W_CH2_HI_LIMIT_MSB_ADDRESS 33
69 #define RTD_2W_CH2_HI_LIMIT_CSB_ADDRESS 34
70 #define RTD_2W_CH2_HI_LIMIT_LSB_ADDRESS 35
71 #define RTD_2W_CH3_HI_LIMIT_MSB_ADDRESS 36
72 #define RTD_2W_CH3_HI_LIMIT_CSB_ADDRESS 37
73 #define RTD_2W_CH3_HI_LIMIT_LSB_ADDRESS 38
74 #define RTD_2W_CH4_HI_LIMIT_MSB_ADDRESS 39
75 #define RTD_2W_CH4_HI_LIMIT_CSB_ADDRESS 40
76 #define RTD_2W_CH4_HI_LIMIT_LSB_ADDRESS 41
77 #define RTD_2W_CH5_HI_LIMIT_MSB_ADDRESS 42
78 #define RTD_2W_CH5_HI_LIMIT_CSB_ADDRESS 43
79 #define RTD_2W_CH5_HI_LIMIT_LSB_ADDRESS 44
80 #define RTD_2W_CH6_HI_LIMIT_MSB_ADDRESS 45
81 #define RTD_2W_CH6_HI_LIMIT_CSB_ADDRESS 46
82 #define RTD_2W_CH6_HI_LIMIT_LSB_ADDRESS 47
83 #define RTD_2W_CH7_HI_LIMIT_MSB_ADDRESS 48
84 #define RTD_2W_CH7_HI_LIMIT_CSB_ADDRESS 49
85 #define RTD_2W_CH7_HI_LIMIT_LSB_ADDRESS 50
86 #define RTD_3W_CH1_HI_LIMIT_MSB_ADDRESS 51
87 #define RTD_3W_CH1_HI_LIMIT_CSB_ADDRESS 52
88 #define RTD_3W_CH1_HI_LIMIT_LSB_ADDRESS 53
89 #define RTD_3W_CH2_HI_LIMIT_MSB_ADDRESS 54
90 #define RTD_3W_CH2_HI_LIMIT_CSB_ADDRESS 55
91 #define RTD_3W_CH2_HI_LIMIT_LSB_ADDRESS 56
92 #define RTD_3W_CH3_HI_LIMIT_MSB_ADDRESS 57
93 #define RTD_3W_CH3_HI_LIMIT_CSB_ADDRESS 58
94 #define RTD_3W_CH3_HI_LIMIT_LSB_ADDRESS 59
95 #define RTD_3W_CH4_HI_LIMIT_MSB_ADDRESS 60
96 #define RTD_3W_CH4_HI_LIMIT_CSB_ADDRESS 61
97 #define RTD_3W_CH4_HI_LIMIT_LSB_ADDRESS 62
98 #define RTD_4W_CH1_HI_LIMIT_MSB_ADDRESS 63
99 #define RTD_4W_CH1_HI_LIMIT_CSB_ADDRESS 64
100 #define RTD_4W_CH1_HI_LIMIT_LSB_ADDRESS 65
101 #define RTD_4W_CH2_HI_LIMIT_MSB_ADDRESS 66
102 #define RTD_4W_CH2_HI_LIMIT_CSB_ADDRESS 67
103 #define RTD_4W_CH2_HI_LIMIT_LSB_ADDRESS 68
104 #define RTD_4W_CH3_HI_LIMIT_MSB_ADDRESS 69
105 #define RTD_4W_CH3_HI_LIMIT_CSB_ADDRESS 70
106 #define RTD_4W_CH3_HI_LIMIT_LSB_ADDRESS 71
107 #define RTD_2W_CH1_LO_LIMIT_MSB_ADDRESS 72
108 #define RTD_2W_CH1_LO_LIMIT_CSB_ADDRESS 73
109 #define RTD_2W_CH1_LO_LIMIT_LSB_ADDRESS 74
110 #define RTD_2W_CH2_LO_LIMIT_MSB_ADDRESS 75
111 #define RTD_2W_CH2_LO_LIMIT_CSB_ADDRESS 76
112 #define RTD_2W_CH2_LO_LIMIT_LSB_ADDRESS 77
113 #define RTD_2W_CH3_LO_LIMIT_MSB_ADDRESS 78
114 #define RTD_2W_CH3_LO_LIMIT_CSB_ADDRESS 79
115 #define RTD_2W_CH3_LO_LIMIT_LSB_ADDRESS 80
116 #define RTD_2W_CH4_LO_LIMIT_MSB_ADDRESS 81
117 #define RTD_2W_CH4_LO_LIMIT_CSB_ADDRESS 82
118 #define RTD_2W_CH4_LO_LIMIT_LSB_ADDRESS 83
119 #define RTD_2W_CH5_LO_LIMIT_MSB_ADDRESS 84
120 #define RTD_2W_CH5_LO_LIMIT_CSB_ADDRESS 85
121 #define RTD_2W_CH5_LO_LIMIT_LSB_ADDRESS 86
122 #define RTD_2W_CH6_LO_LIMIT_MSB_ADDRESS 87
123 #define RTD_2W_CH6_LO_LIMIT_CSB_ADDRESS 88
124 #define RTD_2W_CH6_LO_LIMIT_LSB_ADDRESS 89
125 #define RTD_2W_CH7_LO_LIMIT_MSB_ADDRESS 90
126 #define RTD_2W_CH7_LO_LIMIT_CSB_ADDRESS 91
127 #define RTD_2W_CH7_LO_LIMIT_LSB_ADDRESS 92
128 #define RTD_3W_CH1_LO_LIMIT_MSB_ADDRESS 93
129 #define RTD_3W_CH1_LO_LIMIT_CSB_ADDRESS 94
130 #define RTD_3W_CH1_LO_LIMIT_LSB_ADDRESS 95
131 #define RTD_3W_CH2_LO_LIMIT_MSB_ADDRESS 96
132 #define RTD_3W_CH2_LO_LIMIT_CSB_ADDRESS 97
133 #define RTD_3W_CH2_LO_LIMIT_LSB_ADDRESS 98
134 #define RTD_3W_CH3_LO_LIMIT_MSB_ADDRESS 99
135 #define RTD_3W_CH3_LO_LIMIT_CSB_ADDRESS 100
136 #define RTD_3W_CH3_LO_LIMIT_LSB_ADDRESS 101
137 #define RTD_3W_CH4_LO_LIMIT_MSB_ADDRESS 102
138 #define RTD_3W_CH4_LO_LIMIT_CSB_ADDRESS 103
139 #define RTD_3W_CH4_LO_LIMIT_LSB_ADDRESS 104
140 #define RTD_4W_CH1_LO_LIMIT_MSB_ADDRESS 105
141 #define RTD_4W_CH1_LO_LIMIT_CSB_ADDRESS 106
142 #define RTD_4W_CH1_LO_LIMIT_LSB_ADDRESS 107
143 #define RTD_4W_CH2_LO_LIMIT_MSB_ADDRESS 108
144 #define RTD_4W_CH2_LO_LIMIT_CSB_ADDRESS 109
145 #define RTD_4W_CH2_LO_LIMIT_LSB_ADDRESS 110
146 #define RTD_4W_CH3_LO_LIMIT_MSB_ADDRESS 111
147 #define RTD_4W_CH3_LO_LIMIT_CSB_ADDRESS 112
148 #define RTD_4W_CH3_LO_LIMIT_LSB_ADDRESS 113
149 #define RTD_2W_CH1_R0_MSB0 114
150 #define RTD_2W_CH1_R0_NSB1 115
151 #define RTD_2W_CH1_R0_NSB2 116
152 #define RTD_2W_CH1_R0_LSB3 117
153 #define RTD_2W_CH2_R0_MSB0 118
154 #define RTD_2W_CH2_R0_NSB1 119
155 #define RTD_2W_CH2_R0_NSB2 120
156 #define RTD_2W_CH2_R0_LSB3 121
157 #define RTD_2W_CH3_R0_MSB0 122
158 #define RTD_2W_CH3_R0_NSB1 123
159 #define RTD_2W_CH3_R0_NSB2 124
160 #define RTD_2W_CH3_R0_LSB3 125
161 #define RTD_2W_CH4_R0_MSB0 126
162 #define RTD_2W_CH4_R0_NSB1 127
163 #define RTD_2W_CH4_R0_NSB2 128
164 #define RTD_2W_CH4_R0_LSB3 129
165 #define RTD_2W_CH5_R0_MSB0 130
166 #define RTD_2W_CH5_R0_NSB1 131
167 #define RTD_2W_CH5_R0_NSB2 132
168 #define RTD_2W_CH5_R0_LSB3 133
169 #define RTD_2W_CH6_R0_MSB0 134
170 #define RTD_2W_CH6_R0_NSB1 135
171 #define RTD_2W_CH6_R0_NSB2 136
172 #define RTD_2W_CH6_R0_LSB3 137
173 #define RTD_2W_CH7_R0_MSB0 138
174 #define RTD_2W_CH7_R0_NSB1 139
175 #define RTD_2W_CH7_R0_NSB2 140
176 #define RTD_2W_CH7_R0_LSB3 141
177 
178 #define RTD_3W_CH1_R0_MSB0 142
179 #define RTD_3W_CH1_R0_NSB1 143
180 #define RTD_3W_CH1_R0_NSB2 144
181 #define RTD_3W_CH1_R0_LSB3 145
182 #define RTD_3W_CH2_R0_MSB0 146
183 #define RTD_3W_CH2_R0_NSB1 147
184 #define RTD_3W_CH2_R0_NSB2 148
185 #define RTD_3W_CH2_R0_LSB3 149
186 #define RTD_3W_CH3_R0_MSB0 150
187 #define RTD_3W_CH3_R0_NSB1 151
188 #define RTD_3W_CH3_R0_NSB2 152
189 #define RTD_3W_CH3_R0_LSB3 153
190 #define RTD_3W_CH4_R0_MSB0 154
191 #define RTD_3W_CH4_R0_NSB1 155
192 #define RTD_3W_CH4_R0_NSB2 156
193 #define RTD_3W_CH4_R0_LSB3 157
194 #define RTD_4W_CH1_R0_MSB0 158
195 #define RTD_4W_CH1_R0_NSB1 159
196 #define RTD_4W_CH1_R0_NSB2 160
197 #define RTD_4W_CH1_R0_LSB3 161
198 #define RTD_4W_CH2_R0_MSB0 162
199 #define RTD_4W_CH2_R0_NSB1 163
200 #define RTD_4W_CH2_R0_NSB2 164
201 #define RTD_4W_CH2_R0_LSB3 165
202 #define RTD_4W_CH3_R0_MSB0 166
203 #define RTD_4W_CH3_R0_NSB1 167
204 #define RTD_4W_CH3_R0_NSB2 168
205 #define RTD_4W_CH3_R0_LSB3 169
206 
208 
209 #define FIRST_RAM_REGISTER 170
210 
211 #define RTD_2W_CH1_MSB_ADDRESS 170
212 #define RTD_2W_CH1_CSB_ADDRESS 171
213 #define RTD_2W_CH1_LSB_ADDRESS 172
214 #define RTD_2W_CH2_MSB_ADDRESS 173
215 #define RTD_2W_CH2_CSB_ADDRESS 174
216 #define RTD_2W_CH2_LSB_ADDRESS 175
217 #define RTD_2W_CH3_MSB_ADDRESS 176
218 #define RTD_2W_CH3_CSB_ADDRESS 177
219 #define RTD_2W_CH3_LSB_ADDRESS 178
220 #define RTD_2W_CH4_MSB_ADDRESS 179
221 #define RTD_2W_CH4_CSB_ADDRESS 180
222 #define RTD_2W_CH4_LSB_ADDRESS 181
223 #define RTD_2W_CH5_MSB_ADDRESS 182
224 #define RTD_2W_CH5_CSB_ADDRESS 183
225 #define RTD_2W_CH5_LSB_ADDRESS 184
226 #define RTD_2W_CH6_MSB_ADDRESS 185
227 #define RTD_2W_CH6_CSB_ADDRESS 186
228 #define RTD_2W_CH6_LSB_ADDRESS 187
229 #define RTD_2W_CH7_MSB_ADDRESS 188
230 #define RTD_2W_CH7_CSB_ADDRESS 189
231 #define RTD_2W_CH7_LSB_ADDRESS 190
232 
233 #define RTD_3W_CH1_MSB_ADDRESS 191
234 #define RTD_3W_CH1_CSB_ADDRESS 192
235 #define RTD_3W_CH1_LSB_ADDRESS 193
236 #define RTD_3W_CH2_MSB_ADDRESS 194
237 #define RTD_3W_CH2_CSB_ADDRESS 195
238 #define RTD_3W_CH2_LSB_ADDRESS 196
239 #define RTD_3W_CH3_MSB_ADDRESS 197
240 #define RTD_3W_CH3_CSB_ADDRESS 198
241 #define RTD_3W_CH3_LSB_ADDRESS 199
242 #define RTD_3W_CH4_MSB_ADDRESS 200
243 #define RTD_3W_CH4_CSB_ADDRESS 201
244 #define RTD_3W_CH4_LSB_ADDRESS 202
245 
246 #define RTD_4W_CH1_MSB_ADDRESS 203
247 #define RTD_4W_CH1_CSB_ADDRESS 204
248 #define RTD_4W_CH1_LSB_ADDRESS 205
249 #define RTD_4W_CH2_MSB_ADDRESS 206
250 #define RTD_4W_CH2_CSB_ADDRESS 207
251 #define RTD_4W_CH2_LSB_ADDRESS 208
252 #define RTD_4W_CH3_MSB_ADDRESS 209
253 #define RTD_4W_CH3_CSB_ADDRESS 210
254 #define RTD_4W_CH3_LSB_ADDRESS 211
255 
256 #define RS232_STATUS_ADDRESS 212
257 #define RS232_TX_BUFFER_ADDRESS 213
258 #define RS232_RX_BUFFER_ADDRESS 214
259 
260 #define RS485_STATUS_ADDRESS 215
261 #define RS485_TX_BUFFER_ADDRESS 216
262 #define RS485_RX_BUFFER_ADDRESS 217
263 
264 #define FIRST_ADS1248_REGISTER 218
265 
266 #define ADS1248_MUX0 218
267 #define ADS1248_VBIAS 219
268 #define ADS1248_MUX1 220
269 #define ADS1248_SYS0 221
270 #define ADS1248_OFC0 222
271 #define ADS1248_OFC1 223
272 #define ADS1248_OFC2 224
273 #define ADS1248_FSC0 225
274 #define ADS1248_FSC1 226
275 #define ADS1248_FSC2 227
276 #define ADS1248_IDAC0 228
277 #define ADS1248_IDAC1 229
278 #define ADS1248_GPIOCFG 230
279 #define ADS1248_GPIODIR 231
280 #define ADS1248_GPIODAT 232
281 
282 #define LAST_ADS1248_REGISTER 232
283 
284 #define RESET_ADDRESS 233
285 #define SIGNATURE_ADDRESS 234
286 
287 #define LAST_RAM_REGISTER 234
288 
289 #endif
290