comparison src/comm.asm @ 347:7e5772df60cd

Changed content for new 0x6F command (Get compact headers)
author heinrichsweikamp
date Wed, 22 Jul 2015 10:42:15 +0200
parents cf9ce6053dee
children 2fd258596af0
comparison
equal deleted inserted replaced
346:cf9ce6053dee 347:7e5772df60cd
569 ;----------------------------------------------------------------------------- 569 ;-----------------------------------------------------------------------------
570 570
571 comm_send_compact_headers: 571 comm_send_compact_headers:
572 movlw "m" ; send echo 572 movlw "m" ; send echo
573 movwf TXREG1 573 movwf TXREG1
574 ; Send 16 bytes/dive (Compact Header) 574 ; Send 13 bytes/dive (Compact Header)
575 ; 1st: 20000Ch-20001Ch 575 ; 1st: 200009h-200016h
576 ; 2nd: 20100Ch-20101Ch 576 ; 2nd: 201009h-201016h
577 ; 3rd: 20200Ch-20201Ch 577 ; 3rd: 202009h-202016h
578 ; 100: 26400Ch-26401Ch 578 ; 100: 264009h-264016h
579 ; 256: 2FF00Ch-2FF01Ch 579 ; 256: 2FF009h-2FF016h
580 movlw 0x1F 580 movlw 0x1F
581 movwf ext_flash_address+2 581 movwf ext_flash_address+2
582 movlw 0xF0 582 movlw 0xF0
583 movwf ext_flash_address+1 583 movwf ext_flash_address+1
584 584
585 comm_send_compact_headers2: 585 comm_send_compact_headers2:
586 movlw 0x0C 586 movlw 0x09
587 movwf ext_flash_address+0 587 movwf ext_flash_address+0
588 ; Adjust address for next dive 588 ; Adjust address for next dive
589 movlw 0x10 589 movlw 0x10
590 addwf ext_flash_address+1 590 addwf ext_flash_address+1
591 movlw 0x00 591 movlw 0x00
595 cpfseq ext_flash_address+2 ; All 256 dive send? 595 cpfseq ext_flash_address+2 ; All 256 dive send?
596 bra comm_send_compact_headers4 ; No, continue 596 bra comm_send_compact_headers4 ; No, continue
597 bra comm_download_mode0 ; Done. Loop with timeout reset 597 bra comm_download_mode0 ; Done. Loop with timeout reset
598 598
599 comm_send_compact_headers4: 599 comm_send_compact_headers4:
600 movlw .10 600 movlw .13
601 movwf lo ; Counter 601 movwf lo ; Counter
602 call rs232_wait_tx ; Wait for UART 602 call rs232_wait_tx ; Wait for UART
603 call ext_flash_read_block_start ; 1st byte 603 call ext_flash_read_block_start ; 1st byte
604 movwf TXREG1 604 movwf TXREG1
605 bra comm_send_compact_headers3 ; counter 24bit 605 bra comm_send_compact_headers3 ; counter 24bit
609 comm_send_compact_headers3: 609 comm_send_compact_headers3:
610 call rs232_wait_tx ; Wait for UART 610 call rs232_wait_tx ; Wait for UART
611 decfsz lo,F 611 decfsz lo,F
612 bra comm_send_compact_headers_loop 612 bra comm_send_compact_headers_loop
613 call ext_flash_read_block_stop 613 call ext_flash_read_block_stop
614 movlw .6 614
615 movwf lo ; Counter 615 movlw 0xFF ; Spare
616 comm_send_compact_headers5:
617 movlw 0xFF
618 movwf TXREG1 616 movwf TXREG1
619 call rs232_wait_tx ; Wait for UART 617 call rs232_wait_tx ; Wait for UART
620 decfsz lo,F 618 movlw 0xFF ; Spare
621 bra comm_send_compact_headers5 619 movwf TXREG1
620 call rs232_wait_tx ; Wait for UART
621 movlw 0xFF ; Spare
622 movwf TXREG1
623 call rs232_wait_tx ; Wait for UART
624
622 bra comm_send_compact_headers2 ; continue 625 bra comm_send_compact_headers2 ; continue
623 626
624 627
625 ;----------------------------------------------------------------------------- 628 ;-----------------------------------------------------------------------------
626 629