Subversion Repositories svnkaklik

Rev

Rev 322 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 322 Rev 323
Line 43... Line 43...
43
0218  D7FE      	BRA	label268438551
43
0218  D7FE      	BRA	label268438551
44
 
44
 
45
	Loop
45
	Loop
46
	receive = rcreg
46
	receive = rcreg
47
021A  50AE      	MOVF gbl_rcreg, W
47
021A  50AE      	MOVF gbl_rcreg, W
48
021C  6E07      	MOVWF CompTempVarRet489
48
021C  6E06      	MOVWF CompTempVarRet489
49
 
49
 
50
	
50
	
51
End Function
51
End Function
52
021E  0012      	RETURN
52
021E  0012      	RETURN
53
 
53
 
Line 58... Line 58...
58
0204            label268438562
58
0204            label268438562
59
0204  A89E      	BTFSS gbl_pir1,4
59
0204  A89E      	BTFSS gbl_pir1,4
60
0206  D7FE      	BRA	label268438562
60
0206  D7FE      	BRA	label268438562
61
 
61
 
62
	txreg = c
62
	txreg = c
63
0208  5007      	MOVF send_00000_arg_c, W
63
0208  5006      	MOVF send_00000_arg_c, W
64
020A  6EAD      	MOVWF gbl_txreg
64
020A  6EAD      	MOVWF gbl_txreg
65
 
65
 
66
End Sub
66
End Sub
67
020C  0012      	RETURN
67
020C  0012      	RETURN
68
 
68
 
Line 71... Line 71...
71
 
71
 
72
	Dim motors As Byte
72
	Dim motors As Byte
73
	Dim sensors As Byte
73
	Dim sensors As Byte
74
	Dim buttons As Byte
74
	Dim buttons As Byte
75
	Dim leds As Byte
75
	Dim leds As Byte
76
	Dim count As word
76
	Dim count As Byte
77
	Dim i As Long
77
	Dim i As Long
78
 
78
 
79
	'NASTAVENI IO
79
	'NASTAVENI IO
80
	lata=0xFF
80
	lata=0xFF
81
0220  6889      	SETF gbl_lata
81
0220  6889      	SETF gbl_lata
Line 151... Line 151...
151
025E  6E03      	MOVWF main_1_leds
151
025E  6E03      	MOVWF main_1_leds
152
 
152
 
153
	count = 400000
153
	count = 400000
154
0260  0E80      	MOVLW 0x80
154
0260  0E80      	MOVLW 0x80
155
0262  6E04      	MOVWF main_1_count
155
0262  6E04      	MOVWF main_1_count
156
0264  0E1A      	MOVLW 0x1A
-
 
157
0266  6E05      	MOVWF main_1_count+D'1'
-
 
158
 
156
 
159
	
157
	
160
	do while (count > 0)
158
	do while (count > 0)
161
0268            label268438603
159
0264            label268438603
162
0268  5004      	MOVF main_1_count, W
160
0264  5004      	MOVF main_1_count, W
163
026A  0800      	SUBLW 0x00
161
0266  0800      	SUBLW 0x00
164
026C  B0D8      	BTFSC STATUS,C
-
 
165
026E  5005      	MOVF main_1_count+D'1', W
-
 
166
0270  E013      	BZ	label268438605
162
0268  E20E      	BC	label268438604
167
 
163
 
168
		count = count -1
164
		count = count -1
169
0272  0E01      	MOVLW 0x01
-
 
170
0274  5C04      	SUBWF main_1_count, W
165
026A  0404      	DECF main_1_count, W
171
0276  6E07      	MOVWF CompTempVar492
-
 
172
0278  A0D8      	BTFSS STATUS,C
-
 
173
027A  0605      	DECF main_1_count+D'1', F
-
 
174
027C  5007      	MOVF CompTempVar492, W
-
 
175
027E  6E04      	MOVWF main_1_count
166
026C  6E04      	MOVWF main_1_count
176
 
167
 
177
		
168
		
178
		if count < 300000 then
169
		if count < 300000 then
179
			leds = leds | 1
170
			leds = leds | 1
180
0280  0E01      	MOVLW 0x01
171
026E  0E01      	MOVLW 0x01
181
0282  1003      	IORWF main_1_leds, W
172
0270  1003      	IORWF main_1_leds, W
182
0284  6E03      	MOVWF main_1_leds
173
0272  6E03      	MOVWF main_1_leds
183
 
174
 
184
		end if
175
		end if
185
		if count < 200000 then
176
		if count < 200000 then
186
			leds = leds | 2
177
			leds = leds | 2
187
0286  0E02      	MOVLW 0x02
178
0274  0E02      	MOVLW 0x02
188
0288  1003      	IORWF main_1_leds, W
179
0276  1003      	IORWF main_1_leds, W
189
028A  6E03      	MOVWF main_1_leds
180
0278  6E03      	MOVWF main_1_leds
190
 
181
 
191
		end if
182
		end if
192
		if count < 100000 then
183
		if count < 100000 then
193
			leds = leds | 4
184
			leds = leds | 4
194
028C  0E04      	MOVLW 0x04
185
027A  0E04      	MOVLW 0x04
195
028E  1003      	IORWF main_1_leds, W
186
027C  1003      	IORWF main_1_leds, W
196
0290  6E03      	MOVWF main_1_leds
187
027E  6E03      	MOVWF main_1_leds
197
 
188
 
198
		end if
189
		end if
199
		lata = leds
190
		lata = leds
200
0292  5003      	MOVF main_1_leds, W
191
0280  5003      	MOVF main_1_leds, W
201
0294  6E89      	MOVWF gbl_lata
192
0282  6E89      	MOVWF gbl_lata
202
 
193
 
203
	loop
194
	loop
204
0296  D7E8      	BRA	label268438603
195
0284  D7EF      	BRA	label268438603
205
0298            label268438605
196
0286            label268438604
206
 
197
 
207
	leds = 0xFF
198
	leds = 0xFF
208
0298  6803      	SETF main_1_leds
199
0286  6803      	SETF main_1_leds
209
 
200
 
210
	lata = 0xFF
201
	lata = 0xFF
211
029A  6889      	SETF gbl_lata
202
0288  6889      	SETF gbl_lata
212
 
203
 
213
 
204
 
214
		
205
		
215
Do while 1
206
Do while 1
216
029C            label268438623
207
028A            label268438619
217
 
208
 
218
 
209
 
219
  sensors =0xFF 
210
  sensors =0xFF 
220
029C  6802      	SETF main_1_sensors
211
028A  6802      	SETF main_1_sensors
221
 
212
 
222
  sensors = Call receive()	'prijmi stav cidel senzoru
213
  sensors = Call receive()	'prijmi stav cidel senzoru
223
029E  EC07F001  	CALL receive_00000
214
028C  EC07F001  	CALL receive_00000
224
02A2  5007      	MOVF CompTempVarRet489, W
215
0290  5006      	MOVF CompTempVarRet489, W
225
02A4  6E02      	MOVWF main_1_sensors
216
0292  6E02      	MOVWF main_1_sensors
226
 
217
 
227
		
218
		
228
  If (!((sensors.0) and (sensors.1))) Then
219
  If (!((sensors.0) and (sensors.1))) Then
229
02A6  6A06      	CLRF CompTempVar491
220
0294  6A05      	CLRF CompTempVar491
230
02A8  A202      	BTFSS main_1_sensors,1
221
0296  A202      	BTFSS main_1_sensors,1
231
02AA  D003      	BRA	label268438628
222
0298  D003      	BRA	label268438624
232
02AC  A002      	BTFSS main_1_sensors,0
223
029A  A002      	BTFSS main_1_sensors,0
233
02AE  D001      	BRA	label268438628
224
029C  D001      	BRA	label268438624
234
02B0  2A06      	INCF CompTempVar491, F
225
029E  2A05      	INCF CompTempVar491, F
235
02B2            label268438628
226
02A0            label268438624
236
02B2  5206      	MOVF CompTempVar491, F
227
02A0  5205      	MOVF CompTempVar491, F
237
02B4  E102      	BNZ	label268438629
228
02A2  E102      	BNZ	label268438625
238
02BA            label268438629
229
02A8            label268438625
239
 
230
 
240
    motors = 0x77
231
    motors = 0x77
241
02B6  0E77      	MOVLW 0x77
232
02A4  0E77      	MOVLW 0x77
242
02B8  6E01      	MOVWF main_1_motors
233
02A6  6E01      	MOVWF main_1_motors
243
 
234
 
244
  End If
235
  End If
245
			
236
			
246
  If (!(sensors.2)) Then
237
  If (!(sensors.2)) Then
247
02BA  B402      	BTFSC main_1_sensors,2
238
02A8  B402      	BTFSC main_1_sensors,2
248
02BC  D002      	BRA	label268438632
239
02AA  D002      	BRA	label268438628
249
02C2            label268438632
240
02B0            label268438628
250
 
241
 
251
    motors = 0xF7
242
    motors = 0xF7
252
02BE  0EF7      	MOVLW 0xF7
243
02AC  0EF7      	MOVLW 0xF7
253
02C0  6E01      	MOVWF main_1_motors
244
02AE  6E01      	MOVWF main_1_motors
254
 
245
 
255
  End If
246
  End If
256
		
247
		
257
  If (!(sensors.3)) Then
248
  If (!(sensors.3)) Then
258
02C2  B602      	BTFSC main_1_sensors,3
249
02B0  B602      	BTFSC main_1_sensors,3
259
02C4  D002      	BRA	label268438635
250
02B2  D002      	BRA	label268438631
260
02CA            label268438635
251
02B8            label268438631
261
 
252
 
262
    motors = 0x7F
253
    motors = 0x7F
263
02C6  0E7F      	MOVLW 0x7F
254
02B4  0E7F      	MOVLW 0x7F
264
02C8  6E01      	MOVWF main_1_motors
255
02B6  6E01      	MOVWF main_1_motors
265
 
256
 
266
  End If 
257
  End If 
267
				
258
				
268
  lata = sensors
259
  lata = sensors
269
02CA  5002      	MOVF main_1_sensors, W
260
02B8  5002      	MOVF main_1_sensors, W
270
02CC  6E89      	MOVWF gbl_lata
261
02BA  6E89      	MOVWF gbl_lata
271
 
262
 
272
  call send(motors)
263
  call send(motors)
273
02CE  5001      	MOVF main_1_motors, W
264
02BC  5001      	MOVF main_1_motors, W
274
02D0  6E07      	MOVWF send_00000_arg_c
265
02BE  6E06      	MOVWF send_00000_arg_c
275
02D2  EC02F001  	CALL send_00000
266
02C0  EC02F001  	CALL send_00000
276
 
267
 
277
		
268
		
278
Loop
269
Loop
279
02D6  D7E2      	BRA	label268438623
270
02C4  D7E2      	BRA	label268438619
280
 
271
 
281
  	
272
  	
282
End Sub
273
End Sub
283
 
274
 
284
 
275
 
285
////////////////////////////////////////
276
////////////////////////////////////////
286
// Code with no source :-)
277
// Code with no source :-)
287
////////////////////////////////////////
278
////////////////////////////////////////
288
0200  EF6CF001  	GOTO	_startup
279
0200  EF63F001  	GOTO	_startup
289
 
280
 
290
 
281
 
291
02D8            _startup
282
02C6            _startup
292
02D8  EF10F001  	GOTO	main
283
02C6  EF10F001  	GOTO	main
293
 
284
 
294
300000  FEFF      	DW 0xFEFF
285
300000  FEFF      	DW 0xFEFF
295
300002  FEF6      	DW 0xFEF6
286
300002  FEF6      	DW 0xFEF6
296
300004  FEFF      	DW 0xFEFF
287
300004  FEFF      	DW 0xFEFF
297
300006  FFFB      	DW 0xFFFB
288
300006  FFFB      	DW 0xFFFB