質問編集履歴
1
test
CHANGED
File without changes
|
test
CHANGED
@@ -160,13 +160,51 @@
|
|
160
160
|
|
161
161
|
// Pattern A
|
162
162
|
|
163
|
+
|
164
|
+
|
165
|
+
// Read Receive Data
|
166
|
+
|
167
|
+
buf = SSP1BUF;
|
168
|
+
|
169
|
+
// Set Send Data
|
170
|
+
|
171
|
+
SSP1BUF = DUMMY;
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
//Clear Flag
|
176
|
+
|
177
|
+
PIR1bits.SSP1IF = 0;
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
// Pattern B
|
184
|
+
|
163
185
|
/*
|
164
186
|
|
165
|
-
// Read Receive Data
|
187
|
+
// Read Receive Data1
|
166
188
|
|
167
189
|
buf = SSP1BUF;
|
168
190
|
|
169
|
-
// Set Send Data
|
191
|
+
// Set Send Data2
|
192
|
+
|
193
|
+
SSP1BUF = 0x00;
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
// Wait Send
|
198
|
+
|
199
|
+
while(!SSP1STATbits.BF);
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
// Read Receive Data2
|
204
|
+
|
205
|
+
buf = SSP1BUF;
|
206
|
+
|
207
|
+
// Set Next Send Data1
|
170
208
|
|
171
209
|
SSP1BUF = DUMMY;
|
172
210
|
|
@@ -178,44 +216,6 @@
|
|
178
216
|
|
179
217
|
*/
|
180
218
|
|
181
|
-
|
182
|
-
|
183
|
-
// Pattern B
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
// Read Receive Data1
|
188
|
-
|
189
|
-
buf = SSP1BUF;
|
190
|
-
|
191
|
-
// Set Send Data2
|
192
|
-
|
193
|
-
SSP1BUF = 0x00;
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
// Wait Send
|
198
|
-
|
199
|
-
while(!SSP1STATbits.BF);
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
// Read Receive Data2
|
204
|
-
|
205
|
-
buf = SSP1BUF;
|
206
|
-
|
207
|
-
// Set Next Send Data1
|
208
|
-
|
209
|
-
SSP1BUF = DUMMY;
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
//Clear Flag
|
214
|
-
|
215
|
-
PIR1bits.SSP1IF = 0;
|
216
|
-
|
217
|
-
|
218
|
-
|
219
219
|
}
|
220
220
|
|
221
221
|
}
|