Mercurial > public > hwos_code
comparison src/comm.asm @ 128:bd74161c4292
catch timeout during set time/date command
author | heinrichsweikamp |
---|---|
date | Tue, 01 Jul 2014 17:37:02 +0200 |
parents | 40ff64d60054 |
children | 9a637c9bb19a |
comparison
equal
deleted
inserted
replaced
127:2899e886ea26 | 128:bd74161c4292 |
---|---|
603 movwf TXREG1 | 603 movwf TXREG1 |
604 | 604 |
605 call rs232_wait_tx ; wait for UART | 605 call rs232_wait_tx ; wait for UART |
606 call rs232_get_byte | 606 call rs232_get_byte |
607 btfsc rs232_recieve_overflow ; Got byte? | 607 btfsc rs232_recieve_overflow ; Got byte? |
608 return ; No, abort! | 608 bra comm_download_mode0 ; No, abort |
609 movff RCREG1, hours | 609 movff RCREG1, hours |
610 movlw d'24' | 610 movlw d'24' |
611 cpfslt hours | 611 cpfslt hours |
612 clrf hours | 612 clrf hours |
613 call rs232_get_byte | 613 call rs232_get_byte |
614 btfsc rs232_recieve_overflow ; Got byte? | 614 btfsc rs232_recieve_overflow ; Got byte? |
615 return ; No, abort! | 615 bra comm_download_mode0 ; No, abort |
616 movff RCREG1, mins | 616 movff RCREG1, mins |
617 movlw d'60' | 617 movlw d'60' |
618 cpfslt mins | 618 cpfslt mins |
619 clrf mins | 619 clrf mins |
620 call rs232_get_byte | 620 call rs232_get_byte |
621 btfsc rs232_recieve_overflow ; Got byte? | 621 btfsc rs232_recieve_overflow ; Got byte? |
622 return ; No, abort! | 622 bra comm_download_mode0 ; No, abort |
623 movff RCREG1, secs | 623 movff RCREG1, secs |
624 movlw d'60' | 624 movlw d'60' |
625 cpfslt secs | 625 cpfslt secs |
626 clrf secs | 626 clrf secs |
627 call rs232_get_byte | 627 call rs232_get_byte |
628 btfsc rs232_recieve_overflow ; Got byte? | 628 btfsc rs232_recieve_overflow ; Got byte? |
629 return ; No, abort! | 629 bra comm_download_mode0 ; No, abort |
630 movff RCREG1, month | 630 movff RCREG1, month |
631 movlw d'13' | 631 movlw d'13' |
632 cpfslt month | 632 cpfslt month |
633 movwf month | 633 movwf month |
634 call rs232_get_byte | 634 call rs232_get_byte |
635 btfsc rs232_recieve_overflow ; Got byte? | 635 btfsc rs232_recieve_overflow ; Got byte? |
636 return ; No, abort! | 636 bra comm_download_mode0 ; No, abort |
637 call comm_check_day ; Check day | 637 call comm_check_day ; Check day |
638 call rs232_get_byte | 638 call rs232_get_byte |
639 btfsc rs232_recieve_overflow ; Got byte? | 639 btfsc rs232_recieve_overflow ; Got byte? |
640 return ; No, abort! | 640 bra comm_download_mode0 ; No, abort |
641 movff RCREG1, year | 641 movff RCREG1, year |
642 movlw d'100' | 642 movlw d'100' |
643 cpfslt year | 643 cpfslt year |
644 clrf year | 644 clrf year |
645 ; All ok, set RTCC | 645 ; All ok, set RTCC |