📄 i2c24lc.lst
字号:
264 ;I2C24LC.C: 88: (GIE = 1);
265 0679 178B bsf 11,7
266 ;I2C24LC.C: 89: }
267 067A 0008 return ;W free
268 067B _WaitAck
269 ; _errtime assigned to ?a_WaitAck+0
270 0000 _WaitAck$errtime set ?a_WaitAck
271 ;I2C24LC.C: 92: unsigned char WaitAck(void)
272 067B 30FF movlw -1
273 067C 0183 clrf 3 ;select bank 0
274 067D 00B1 movwf ?a_WaitAck
275 ;I2C24LC.C: 95: PORTC=(pc_out|= 0B00010000);
276 067E 1623 bsf _pc_out,4
277 067F 0823 movf _pc_out,w
278 0680 0087 movwf 7 ;volatile
279 ;I2C24LC.C: 96: SomeNOP();
280 0681 264C fcall _SomeNOP
281 ;I2C24LC.C: 97: PORTC =(pc_out|= 0B00001000);
282 0682 15A3 bsf _pc_out,3
283 0683 0823 movf _pc_out,w
284 0684 0087 movwf 7 ;volatile
285 ;I2C24LC.C: 98: SomeNOP();
286 0685 264C fcall _SomeNOP
287 ;I2C24LC.C: 99: TRISC |= 0B00010000;
288 0686 1683 bsf 3,5
289 0687 1607 bsf 7,4 ;volatile
290 ;I2C24LC.C: 100: while(PORTC&0B00010000)
291 0688 2E8F goto l12
292 0689 l13
293 ;I2C24LC.C: 101: { errtime--;
294 0689 0BB1 decfsz ?a_WaitAck
295 ;I2C24LC.C: 102: if (!errtime)
296 068A 2E8F goto l12
297 ;I2C24LC.C: 103: {I2CStop();
298 068B 266A 120A 118A fcall _I2CStop
299 ;I2C24LC.C: 104: return 0x00;}
300 068E 3400 retlw 0
301 068F l12
302 068F 1283 bcf 3,5
303 0690 1A07 btfsc 7,4 ;volatile
304 0691 2E89 goto l13
305 ;I2C24LC.C: 105: }
306 0692 1683 bsf 3,5
307 0693 1207 bcf 7,4 ;volatile
308 ;I2C24LC.C: 107: PORTC =(pc_out&= ~0B00001000);
309 0694 1283 bcf 3,5
310 0695 11A3 bcf _pc_out,3
311 0696 0823 movf _pc_out,w
312 0697 0087 movwf 7 ;volatile
313 ;I2C24LC.C: 108: return 0x01;
314 0698 3401 retlw 1
315 0699 _SendAck
316 ;I2C24LC.C: 113: void SendAck(void)
317 0699 0183 clrf 3 ;select bank 0
318 069A 1223 bcf _pc_out,4
319 069B 0823 movf _pc_out,w
320 069C 0087 movwf 7 ;volatile
321 ;I2C24LC.C: 116: SomeNOP();
322 069D 264C fcall _SomeNOP
323 ;I2C24LC.C: 117: PORTC =(pc_out|= 0B00001000);
324 069E 15A3 bsf _pc_out,3
325 069F 0823 movf _pc_out,w
326 06A0 0087 movwf 7 ;volatile
327 ;I2C24LC.C: 118: SomeNOP();
328 06A1 264C fcall _SomeNOP
329 ;I2C24LC.C: 119: PORTC =(pc_out&= ~0B00001000);
330 06A2 11A3 bcf _pc_out,3
331 06A3 0823 movf _pc_out,w
332 06A4 0087 movwf 7 ;volatile
333 ;I2C24LC.C: 120: }
334 06A5 0008 return ;W free
335 06A6 _SendNotAck
336 ;I2C24LC.C: 123: void SendNotAck(void)
337 06A6 0183 clrf 3 ;select bank 0
338 06A7 1623 bsf _pc_out,4
339 06A8 0823 movf _pc_out,w
340 06A9 0087 movwf 7 ;volatile
341 ;I2C24LC.C: 126: SomeNOP();
342 06AA 264C fcall _SomeNOP
343 ;I2C24LC.C: 127: PORTC =(pc_out|= 0B00001000);
344 06AB 15A3 bsf _pc_out,3
345 06AC 0823 movf _pc_out,w
346 06AD 0087 movwf 7 ;volatile
347 ;I2C24LC.C: 128: SomeNOP();
348 06AE 264C fcall _SomeNOP
349 ;I2C24LC.C: 129: PORTC =(pc_out&= ~0B00001000);
350 06AF 11A3 bcf _pc_out,3
351 06B0 0823 movf _pc_out,w
352 06B1 0087 movwf 7 ;volatile
353 ;I2C24LC.C: 130: }
354 06B2 0008 return ;W free
355 06B3 _I2CReceiveByte
356 ; _i assigned to ?a_I2CReceiveByte+0
357 0000 _I2CReceiveByte$i set ?a_I2CReceiveByte
358 ; _timp assigned to ?a_I2CReceiveByte+1
359 0000 _I2CReceiveByte$timp set ?a_I2CReceiveByte+1
360 ; _ddata assigned to ?a_I2CReceiveByte+2
361 0000 _I2CReceiveByte$ddata set ?a_I2CReceiveByte+2
362 ;I2C24LC.C: 154: unsigned char I2CReceiveByte(v
+ oid)
363 06B3 3008 movlw 8
364 06B4 0183 clrf 3 ;select bank 0
365 06B5 00B1 movwf ?a_I2CReceiveByte
366 ;I2C24LC.C: 157: unsigned char ddata,timp;
367 06B6 01B3 clrf ?a_I2CReceiveByte+2
368 ;I2C24LC.C: 159: PORTC=(pc_out|= 0B00010000);
369 06B7 1623 bsf _pc_out,4
370 06B8 0823 movf _pc_out,w
371 06B9 0087 movwf 7 ;volatile
372 ;I2C24LC.C: 160: TRISC |= 0B00010000;
373 06BA 1683 bsf 3,5
374 06BB 1607 bsf 7,4 ;volatile
375 ;I2C24LC.C: 161: while (i--)
376 06BC 2ECF goto l25
377 06BD l26
378 ;I2C24LC.C: 162: {
379 06BD 1003 bcf 3,0
380 06BE 0DB3 rlf ?a_I2CReceiveByte+2
381 ;I2C24LC.C: 164: PORTC =(pc_out&= ~0B00001000);
382 06BF 11A3 bcf _pc_out,3
383 06C0 0823 movf _pc_out,w
384 06C1 0087 movwf 7 ;volatile
385 ;I2C24LC.C: 165: SomeNOP();
386 06C2 264C fcall _SomeNOP
387 ;I2C24LC.C: 166: PORTC =(pc_out|= 0B00001000);
388 06C3 15A3 bsf _pc_out,3
389 06C4 0823 movf _pc_out,w
390 06C5 0087 movwf 7 ;volatile
391 ;I2C24LC.C: 167: SomeNOP();
392 06C6 264C fcall _SomeNOP
393 ;I2C24LC.C: 169: timp = PORTC&0B00010000;
394 06C7 0807 movf 7,w ;volatile
395 06C8 3910 andlw 16
396 06C9 00B2 movwf ?a_I2CReceiveByte+1
397 ;I2C24LC.C: 170: timp>>=4;
398 06CA 0EB2 swapf ?a_I2CReceiveByte+1
399 06CB 300F movlw 15
400 06CC 05B2 andwf ?a_I2CReceiveByte+1
401 ;I2C24LC.C: 171: ddata|=timp;
402 06CD 0832 movf ?a_I2CReceiveByte+1,w
403 06CE 04B3 iorwf ?a_I2CReceiveByte+2
404 06CF l25
405 06CF 1283 bcf 3,5
406 06D0 03B1 decf ?a_I2CReceiveByte
407 06D1 0F31 incfsz ?a_I2CReceiveByte,w
408 06D2 2EBD goto l26
409 ;I2C24LC.C: 172: }
410 06D3 11A3 bcf _pc_out,3
411 06D4 0823 movf _pc_out,w
412 06D5 0087 movwf 7 ;volatile
413 ;I2C24LC.C: 174: TRISC &= ~0B00010000;
414 06D6 1683 bsf 3,5
415 06D7 1207 bcf 7,4 ;volatile
416 ;I2C24LC.C: 175: return ddata;
417 06D8 1283 bcf 3,5
418 06D9 0833 movf ?a_I2CReceiveByte+2,w
419 ;I2C24LC.C: 176: }
420 06DA 0008 return ;uses W
421 06DB _I2C_QUERY
422 06DB l63
423 ;I2C24LC.C: 280: void I2C_QUERY(void)
424 ;I2C24LC.C: 283: {
425 06DB 2653 120A 118A fcall _I2CStart
426 ;I2C24LC.C: 285: I2CSendByte((0xA0|0x00)&0xfe);
427 06DE 30A0 movlw -96
428 06DF 2753 fcall _I2CSendByte
429 ;I2C24LC.C: 286: if(WaitAck())
430 06E0 267B 120A 118A fcall _WaitAck
431 06E3 3800 iorlw 0
432 06E4 1D03 btfss 3,2
433 06E5 0008 return
434 06E6 2EDB goto l63
435 06E7 _IIC
436 ; _i assigned to ?a_IIC+0
437 0000 _IIC$i set ?a_IIC
438 ; _DataBuff assigned to ?a_IIC+1
439 0000 _IIC$DataBuff set ?a_IIC+1
440 ; _errorflag assigned to ?a_IIC+2
441 0000 _IIC$errorflag set ?a_IIC+2
442 ;_DataBuff stored from w
443 06E7 0183 clrf 3 ;select bank 0
444 06E8 00AF movwf ?a_IIC+1
445 ;I2C24LC.C: 183: unsigned char IIC(unsigned cha
+ r *DataBuff,char ByteQuantity,unsigned int Addr
+ ess,
446 06E9 01B0 clrf ?a_IIC+2
447 06EA 0AB0 incf ?a_IIC+2
448 ;I2C24LC.C: 187: unsigned char i;
449 06EB 01AE clrf ?a_IIC
450 06EC 0AAE incf ?a_IIC
451 ;I2C24LC.C: 189: TRISC &= ~0B00001000;
452 06ED 1683 bsf 3,5
453 06EE 1187 bcf 7,3 ;volatile
454 ;I2C24LC.C: 190: while(i--)
455 06EF 2F40 goto l29
456 06F0 l30
457 ;I2C24LC.C: 191: {
458 06F0 2653 120A 118A fcall _I2CStart
459 ;I2C24LC.C: 193: I2CSendByte(ControlByte&0xfe);
460 06F3 082D movf ?_IIC+3,w
461 06F4 39FE andlw -2
462 06F5 2753 fcall _I2CSendByte
463 ;I2C24LC.C: 194: if(!WaitAck())
464 06F6 267B 120A 118A fcall _WaitAck
465 06F9 3800 iorlw 0
466 06FA 1903 btfsc 3,2
467 06FB 2F40 goto l29
468 ;I2C24LC.C: 195: continue;
469 ;I2C24LC.C: 196: if(0==0)
470 06FC 082B movf ?_IIC+1,w
471 06FD 2753 fcall _I2CSendByte
472 ;I2C24LC.C: 198: if(!WaitAck())
473 06FE 267B 120A 118A fcall _WaitAck
474 0701 3800 iorlw 0
475 0702 1903 btfsc 3,2
476 0703 2F40 goto l29
477 ;I2C24LC.C: 199: continue;
478 ;I2C24LC.C: 200: }
479 ;I2C24LC.C: 209: }
480 0704 182D btfsc ?_IIC+3,0
481 0705 2F1D goto l38
482 ;I2C24LC.C: 213: {
483 0706 01B0 clrf ?a_IIC+2
484 ;I2C24LC.C: 215: while(ByteQuantity--)
485 0707 2F17 goto l39
486 0708 l40
487 ;I2C24LC.C: 216: {
488 0708 0AAF incf ?a_IIC+1
489 0709 032F decf ?a_IIC+1,w
490 070A 0084 movwf 4
491 070B 1383 bcf 3,7
492 070C 0800 movf 0,w
493 070D 2753 fcall _I2CSendByte
494 ;I2C24LC.C: 218: if(WaitAck())
495 070E 267B 120A 118A fcall _WaitAck
496 0711 3800 iorlw 0
497 0712 1D03 btfss 3,2
498 0713 2F17 goto l39
499 ;I2C24LC.C: 219: continue;
500 ;I2C24LC.C: 220: errorflag=0x01;
501 0714 01B0 clrf ?a_IIC+2
502 0715 0AB0 incf ?a_IIC+2
503 ;I2C24LC.C: 221: break;
504 0716 2F1A goto l41
505 0717 l39
506 0717 03AA decf ?_IIC
507 0718 0F2A incfsz ?_IIC,w
508 0719 2F08 goto l40
509 071A l41
510 ;I2C24LC.C: 222: }
511 071A 0B30 decfsz ?a_IIC+2,w
512 071B 2F44 goto l31
513 071C 2F40 goto l29
514 ;I2C24LC.C: 224: continue;
515 ;I2C24LC.C: 225: break;
516 071D l38
517 ;I2C24LC.C: 227: else
518 071D 2653 120A 118A fcall _I2CStart
519 ;I2C24LC.C: 229: I2CSendByte(ControlByte);
520 0720 082D movf ?_IIC+3,w
521 0721 2753 fcall _I2CSendByte
522 ;I2C24LC.C: 230: if(!WaitAck())
523 0722 267B 120A 118A fcall _WaitAck
524 0725 3800 iorlw 0
525 0726 1903 btfsc 3,2
526 0727 2F40 goto l29
527 0728 2F33 goto l46
528 ;I2C24LC.C: 231: {continue;}
529 ;I2C24LC.C: 232: while(--ByteQuantity)
530 0729 l47
531 ;I2C24LC.C: 233: {*DataBuff++=I2CReceiveByte();
532 0729 082F movf ?a_IIC+1,w
533 072A 0084 movwf 4
534 072B 1383 bcf 3,7
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -