📄 cc1020rx.lst
字号:
00CF 0527 00502 bsf portc,pclk
00D0 0000 00503 nop
00D1 0767 00504 btfss portc,pdo
MPASM 03.20.02 Released CC1020RX.ASM 10-15-2003 11:19:14 PAGE 13
LOC OBJECT CODE LINE SOURCE TEXT
VALUE
00D2 0AD5 00505 goto clr_read_pdo
00D3 0403 00506 bcf status,0;
00D4 0AD6 00507 goto do_shift
00D5 00508 clr_read_pdo:
00509
00D5 0503 00510 bsf status,0;bcf status,0;
00D6 00511 do_shift:
Message[305]: Using default destination of 1 (file).
Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.
00D6 0377 00512 rlf read_data
Message[305]: Using default destination of 1 (file).
Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.
00D7 02F6 00513 decfsz count_data
00D8 0ACD 00514 goto do_read_data
00D9 0427 00515 bcf portc,pclk
00DA 0000 00516 nop
00DB 0547 00517 bsf portc,psel
00DC 0800 00518 retlw 0
00519 ;***********************************
00DD 00520 setupcc1020pd:
00DD 0C00 00521 movlw cc1020_main
Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.
00DE 0035 00522 movwf addr_data
00DF 0C1F 00523 movlw 1fh
Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.
00E0 0034 00524 movwf config_data
00E1 0956 00525 call configure_write
00526 ;setup cc1020 to power down mode
00E2 0C1C 00527 movlw cc1020_pa_power
Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.
00E3 0035 00528 movwf addr_data
00E4 0C00 00529 movlw 00
Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.
00E5 0034 00530 movwf config_data
00E6 0956 00531 call configure_write
00E7 0000 00532 nop
00E8 0800 00533 retlw 0
00534 ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00535 ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00536 ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00537
00538
00539
0210 00540 org 0210h
00541
0210 00542 _main:
00543
00544 ;call init_gpio
00545 ;**** check key-press
0210 00546 loop
0210 0064 00547 clrf fsr ; select blank 0
0211 0203 00548 movfw status ; status register to w
0212 0E98 00549 andlw b'10011000' ; check power on of start
MPASM 03.20.02 Released CC1020RX.ASM 10-15-2003 11:19:14 PAGE 14
LOC OBJECT CODE LINE SOURCE TEXT
VALUE
0213 002A 00550 movwf temp_buf
0214 0743 00551 skpz
0215 0A17 00552 goto power_up ; is else reset
0216 0A25 00553 goto wdt_wake ; is wdt wake the sleep
0217 00554 power_up
0217 09BC 00555 call init_gpio
0218 04A3 00556 block1
Message[306]: Crossing page boundary -- ensure page bits are set.
0219 0913 00557 call resetcc1020
Message[306]: Crossing page boundary -- ensure page bits are set.
021A 091F 00558 call setupcc1020all
Message[306]: Crossing page boundary -- ensure page bits are set.
021B 0981 00559 call single_calibration
021C 05A3 00560 block2
00561 ;***********************************************************************************
021D 00562 m_loop
00563 ;sleep_board ; start sleep of send board
021D 0C8D 00564 movlw b'10001101' ; wdt rate 1 : 32
021E 0002 00565 option
021F 0061 00566 clrf tmr0
0220 00567 slep_lop
0220 0003 00568 sleep ; the mcu start sleep
0221 0000 00569 nop
0222 0000 00570 nop
0223 0000 00571 nop
0224 0000 00572 nop
0225 00573 wdt_wake
0225 0004 00574 clrwdt
0226 0C8D 00575 movlw b'10001101' ; wdt rate 1 : 32
0227 0002 00576 option
0228 09BC 00577 call init_gpio
00578 ;wake_board ; the send board start activity
0229 04A3 00579 block1
00580 ; call resetcc1020
00581 ; call setupcc1020all
00582 ; call single_calibration
022A 05A3 00583 block2
022B 0C01 00584 movlw d'1'
022C 09C4 00585 call delayx
00586 ;***********************************************************************************
00587 ; start bit existence condition:
00588 ;
00589 ; sta_breadthdn =/< counter_buf =/< sta_breadthup
00590 ;
00591 ;--------------------------------------------
022D 00592 check_start
022D 0996 00593 call receive_bit
022E 0C10 00594 movlw sta_breadthdn
022F 0089 00595 subwf counter_buf,w
0230 0703 00596 skpc
0231 0A2D 00597 goto check_start
0232 0C12 00598 movlw sta_breadthup
0233 0089 00599 subwf counter_buf,w
MPASM 03.20.02 Released CC1020RX.ASM 10-15-2003 11:19:14 PAGE 15
LOC OBJECT CODE LINE SOURCE TEXT
VALUE
0234 0603 00600 skpnc
0235 0A2D 00601 goto check_start
00602 ; goto $
00603 ;--------------------------------------------
00604 ; receive id number 8 bit
00605 ;
00606 ; bit 1 existence condition:
00607 ;
00608 ; one_breadthdn =/< counter_buf =/< one_breadthup
00609 ;
00610 ; bit 0 existence condition:
00611 ;
00612 ; zer_breadthdn =/< counter_buf =/< zer_breadthup
00613 ;
00614 ;--------------------------------------------
0236 00615 check_id
0236 0071 00616 clrf bit_cont
0237 00617 check_oneid
0237 0996 00618 call receive_bit
0238 0C04 00619 movlw one_breadthdn
0239 0089 00620 subwf counter_buf,w
023A 0703 00621 skpc
023B 0A2D 00622 goto check_start
023C 0C06 00623 movlw one_breadthup
023D 0089 00624 subwf counter_buf,w
023E 0603 00625 skpnc
023F 0A48 00626 goto check_zerid
0240 0503 00627 bsf status,c
Message[305]: Using default destination of 1 (file).
0241 033C 00628 rrf id_code
0242 02B1 00629 incf bit_cont,f
0243 0C08 00630 movlw d'8'
0244 0091 00631 subwf bit_cont,w
0245 0743 00632 skpz
0246 0A37 00633 goto check_oneid
0247 0A57 00634 goto id_end
0248 00635 check_zerid
0248 0C08 00636 movlw zer_breadthdn
0249 0089 00637 subwf counter_buf,w
024A 0703 00638 skpc
024B 0A2D 00639 goto check_start
024C 0C0A 00640 movlw zer_breadthup
024D 0089 00641 subwf counter_buf,w
024E 0603 00642 skpnc
024F 0A2D 00643 goto check_start
0250 0403 00644 bcf status,c
Message[305]: Using default destination of 1 (file).
0251 033C 00645 rrf id_code
0252 02B1 00646 incf bit_cont,f
0253 0C08 00647 movlw d'8'
0254 0091 00648 subwf bit_cont,w
0255 0743 00649 skpz
0256 0A37 00650 goto check_oneid
MPASM 03.20.02 Released CC1020RX.ASM 10-15-2003 11:19:14 PAGE 16
LOC OBJECT CODE LINE SOURCE TEXT
VALUE
00651 ; goto $
0257 00652 id_end
00653 ;--------------------------------------------
00654 ; receive data or command 8 bit
00655 ;
00656 ; bit 1 existence condition:
00657 ;
00658 ; one_breadthdn =/< counter_buf =/< one_breadthup
00659 ;
00660 ; bit 0 existence condition:
00661 ;
00662 ; zer_breadthdn =/< counter_buf =/< zer_breadthup
00663 ;
00664 ;--------------------------------------------
0257 00665 check_data
0257 0071 00666 clrf bit_cont
0258 00667 check_oneda
0258 0996 00668 call receive_bit
0259 0C04 00669 movlw one_breadthdn
025A 0089 00670 subwf counter_buf,w
025B 0703 00671 skpc
025C 0A2D 00672 goto check_start
025D 0C06 00673 movlw one_breadthup
025E 0089 00674 subwf counter_buf,w
025F 0603 00675 skpnc
0260 0A69 00676 goto check_zerda
0261 0503 00677 bsf status,c
0262 0332 00678 rrf data_buf,f
0263 02B1 00679 incf bit_cont,f
0264 0C08 00680 movlw d'8'
0265 0091 00681 subwf bit_cont,w
0266 0743 00682 skpz
0267 0A58 00683 goto check_oneda
0268 0A78 00684 goto data_end
0269 00685 check_zerda
0269 0C08 00686 movlw zer_breadthdn
026A 0089 00687 subwf counter_buf,w
026B 0703 00688 skpc
026C 0A2D 00689 goto check_start
026D 0C0A 00690 movlw zer_breadthup
026E 0089 00691 subwf counter_buf,w
026F 0603 00692 skpnc
0270 0A2D 00693 goto check_start
0271 0403 00694 bcf status,c
0272 0332 00695 rrf data_buf,f
0273 02B1 00696 incf bit_cont,f
0274 0C08 00697 movlw d'8'
0275 0091 00698 subwf bit_cont,w
0276 0743 00699 skpz
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -