comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 68:d0b677e1e9a5

new decoplan (GF mode) debuged
author heinrichsweikamp
date Wed, 13 Oct 2010 13:02:20 +0200
parents 73b9719a40ec
children df2d3b28947f
comparison
equal deleted inserted replaced
67:73b9719a40ec 68:d0b677e1e9a5
378 378
379 PLED_display_deko_mask: 379 PLED_display_deko_mask:
380 rcall PLED_clear_decoarea 380 rcall PLED_clear_decoarea
381 ; total deco time word 381 ; total deco time word
382 call PLED_divemask_color ; Set Color for Divemode mask 382 call PLED_divemask_color ; Set Color for Divemode mask
383 DISPLAYTEXT d'85' ; DECOSUM 383 DISPLAYTEXT d'85' ; TTS
384 call PLED_standard_color 384 call PLED_standard_color
385 return 385 return
386 386
387 PLED_display_deko: 387 PLED_display_deko:
388 btfsc multi_gf_display ; Is the Multi-GF Table displayed? 388 btfsc multi_gf_display ; Is the Multi-GF Table displayed?
2493 bra PLED_decoplan_gf_page1y 2493 bra PLED_decoplan_gf_page1y
2494 2494
2495 PLED_decoplan_gf_page1x_next_6m: 2495 PLED_decoplan_gf_page1x_next_6m:
2496 movlw d'6' 2496 movlw d'6'
2497 movwf temp7 2497 movwf temp7
2498 incf temp5,F 2498 incf temp5,F
2499 PLED_decoplan_gf_page1y: 2499 PLED_decoplan_gf_page1y:
2500 movlw d'3' 2500 movlw d'3'
2501 addwf temp7,F ; Add 3m for next stop 2501 addwf temp7,F ; Add 3m for next stop
2502 movlw d'25' 2502 movlw d'25'
2503 addwf temp6,F 2503 addwf temp6,F
2525 movlw 'm' 2525 movlw 'm'
2526 movwf POSTINC2 2526 movwf POSTINC2
2527 call word_processor 2527 call word_processor
2528 WIN_LEFT .140 2528 WIN_LEFT .140
2529 movff temp6,win_top 2529 movff temp6,win_top
2530 lfsr FSR1,0x251 2530 ; lfsr FSR1,0x251
2531 lfsr FSR1,0x0E1 ; Gf_decolist_copy
2531 movf temp5,W ; number of entry 2532 movf temp5,W ; number of entry
2532 movff PLUSW1,lo 2533 movff PLUSW1,lo ; Stop length
2534 incf lo,F ; add one dummy minute
2533 lfsr FSR2,letter 2535 lfsr FSR2,letter
2534 output_99x ; outputs into Postinc2! 2536 output_99x ; outputs into Postinc2!
2535 movlw d'39' ;"'" 2537 movlw d'39' ;"'"
2536 movwf POSTINC2 2538 movwf POSTINC2
2537 call word_processor 2539 call word_processor
3400 WIN_TOP .200 3402 WIN_TOP .200
3401 WIN_LEFT .0 3403 WIN_LEFT .0
3402 call PLED_display_clear_common_y1 3404 call PLED_display_clear_common_y1
3403 return 3405 return
3404 3406
3405
3406 ;PLED_const_ppO2_DEBUG:
3407 ; movlw .007
3408 ; call PLED_SetColumn
3409 ; movlw .032
3410 ; call PLED_SetRow
3411 ; lfsr FSR2,letter
3412 ; movff char_O_diluent,lo
3413 ; output_8
3414 ; movlw .001
3415 ; movwf scaleY
3416 ; call word_processor
3417 ; movlw .007
3418 ; call PLED_SetColumn
3419 ; movlw .024
3420 ; call PLED_SetRow
3421 ; lfsr FSR2,letter
3422 ; movff last_diluent,lo
3423 ; output_8
3424 ; movlw .001
3425 ; movwf scaleY
3426 ; call word_processor
3427 ; movlw .007
3428 ; call PLED_SetColumn
3429 ; movlw .016
3430 ; call PLED_SetRow
3431 ; lfsr FSR2,letter
3432 ; movff char_O_deco_status,lo
3433 ; output_8
3434 ; movlw .001
3435 ; movwf scaleY
3436 ; call word_processor
3437 ; return
3438 ;
3439
3440 ;PLED_gaschange_DEBUG:
3441 ; WIN_LEFT .0
3442 ; WIN_TOP .160
3443 ; lfsr FSR2,letter
3444 ; movff char_I_deco_He_ratio,lo
3445 ; output_8
3446 ; call word_processor
3447 ;
3448 ; WIN_LEFT .25
3449 ; WIN_TOP .160
3450 ; call PLED_SetRow
3451 ; lfsr FSR2,letter
3452 ; movff char_I_deco_N2_ratio,lo
3453 ; output_8
3454 ; call word_processor
3455 ;
3456 ; WIN_LEFT .50
3457 ; WIN_TOP .160
3458 ; lfsr FSR2,letter
3459 ; movff char_I_deco_gas_change,lo
3460 ; output_8
3461 ; call word_processor
3462 ;
3463 ; WIN_LEFT .75
3464 ; WIN_TOP .160
3465 ; lfsr FSR2,letter
3466 ; movff hi,lo
3467 ; output_8
3468 ; call word_processor
3469 ; return
3470
3471 ;
3472 ;PLED_MultiGF_deco_all:
3473 ; movff char_O_actual_pointer,wait_temp
3474 ; movff char_O_GF_low_pointer,waitms_temp
3475 ; movf waitms_temp,F
3476 ; bz PLED_MultiGF_no_deco
3477 ; call PLED_MultiGF_table ; input wait_temp
3478 ; return
3479 ;
3480 ;PLED_MultiGF_no_deco:
3481 ; DISPLAYTEXT d'242' ;"no deco"
3482 ; return
3483 ;
3484 ;PLED_MultiGF_table:
3485 ; movlw d'9'
3486 ; movwf temp5 ; number of stops
3487 ; movlw .231
3488 ; movwf temp6 ; row
3489 ; lfsr FSR1,char_IO_deco_table+0
3490 ;
3491 ;PLED_MultiGF_table2:
3492 ; movlw d'25'
3493 ; addwf temp6,F
3494 ; call PLED_MultiGF_show_stop
3495 ; decfsz temp5,F
3496 ; bra PLED_MultiGF_table2
3497 ; return
3498 ;
3499 ;PLED_MultiGF_show_stop:
3500 ; bsf leftbind
3501 ; WIN_LEFT .100
3502 ; movff temp6,win_top
3503 ; movff temp6,hi ; copy for PLED_decoplan_bargraph
3504 ;; call PLED_SetRow ; Set Row
3505 ;
3506 ;
3507 ; movff POSTINC1,lo ; Get Depth
3508 ; movf lo,w
3509 ;
3510 ; lfsr FSR2,letter
3511 ;; btfsc STATUS,Z ; =0
3512 ;; goto PLED_decoplan_delete ; Yes, quit display
3513 ; output_8 ; outputs into Postinc2!
3514 ; movlw 'm'
3515 ; movwf POSTINC2
3516 ; call word_processor
3517 ; WIN_LEFT .140
3518 ; movff temp6,win_top
3519 ;
3520 ; movff POSTINC1,lo ; Get length for this stop
3521 ;
3522 ; lfsr FSR2,letter
3523 ; output_99x ; outputs into Postinc2!
3524 ; movlw d'39' ;"'"
3525 ; movwf POSTINC2
3526 ; call word_processor
3527 ;; call PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth
3528 ; return
3529 ;
3530 ;
3531 ;
3532 ;; movlw .043
3533 ;; movwf temp5
3534 ;; movlw .48 + .8
3535 ;; movwf temp6
3536 ;; movff char_O_GF_low_pointer,wait_temp
3537 ;;
3538 ;;PLED_MultiGF_loop:
3539 ;; decfsz wait_temp,F
3540 ;; bra PLED_MulitGF_nextentry
3541 ;;
3542 ;; bra PLED_MultiGF_calc_tissue_counter
3543 ;;PLED_MGF_lp_calc_tis_counter:
3544 ;;
3545 ;;PLED_MGF_lp_clear_rem_space:
3546 ;; lfsr FSR2,letter
3547 ;; movlw ' '
3548 ;; movwf POSTINC2
3549 ;; movlw ' '
3550 ;; movwf POSTINC2
3551 ;; movlw ' '
3552 ;; movwf POSTINC2
3553 ;; movlw ' '
3554 ;; movwf POSTINC2
3555 ;; movlw ' '
3556 ;; movwf POSTINC2
3557 ;; movlw ' '
3558 ;; movwf POSTINC2
3559 ;; movlw .8
3560 ;; subwf temp6,F
3561 ;; bnz PLED_MultiGF_column_ok_space
3562 ;; movlw .21
3563 ;; subwf temp5,F
3564 ;; bc PLED_MultiGF_new_row_space
3565 ;; return
3566 ;;PLED_MultiGF_new_row_space:
3567 ;; movlw .48
3568 ;; movwf temp6
3569 ;;PLED_MultiGF_column_ok_space:
3570 ;; movf temp5,W
3571 ;; call PLED_SetColumn
3572 ;; movlw .8
3573 ;; subwf temp6,W
3574 ;; call PLED_SetRow
3575 ;; call word_processor
3576 ;; bra PLED_MGF_lp_clear_rem_space
3577 ;;
3578 ;;PLED_MulitGF_nextentry:
3579 ;; lfsr FSR2,letter
3580 ;; movff wait_temp,lo ; pointer to meter
3581 ;; movf lo,W
3582 ;; rlncf lo,F
3583 ;; addwf lo,F
3584 ;; decfsz wait_temp,W
3585 ;; bra PLED_MGF_skip_last_deco2
3586 ;; movff char_I_depth_last_deco,lo
3587 ;;PLED_MGF_skip_last_deco2:
3588 ;; output_99
3589 ;; movlw 0x02
3590 ;; movwf POSTINC2
3591 ;; movlw ':'
3592 ;; movwf POSTINC2
3593 ;; movlw 0x02
3594 ;; movwf POSTINC2
3595 ;; lfsr FSR0,0x250
3596 ;; movf wait_temp,W
3597 ;; movff PLUSW0,lo
3598 ;; movlw d'10' ; gray code
3599 ;; tstfsz lo
3600 ;; movlw b'00001111' ; gray code
3601 ;; movwf grayvalue
3602 ;; bsf leftbind
3603 ;; output_99
3604 ;; bcf leftbind
3605 ;; movlw ' '
3606 ;; movwf POSTINC2
3607 ;; movlw .8
3608 ;; subwf temp6,F
3609 ;; bnz PLED_MultiGF_column_ok
3610 ;; movlw .21
3611 ;; subwf temp5,F
3612 ;; bc PLED_MultiGF_new_row
3613 ;; return
3614 ;;PLED_MultiGF_new_row:
3615 ;; movlw .48
3616 ;; movwf temp6
3617 ;;PLED_MultiGF_column_ok:
3618 ;; movf temp5,W
3619 ;; call PLED_SetColumn
3620 ;; movlw .8
3621 ;; subwf temp6,W
3622 ;; call PLED_SetRow
3623 ;; call word_processor
3624 ;; movlw b'00001111' ; gray code
3625 ;; movwf grayvalue
3626 ;; bra PLED_MultiGF_loop
3627 ;;
3628 ;;
3629 ;;PLED_MultiGF_depth:
3630 ;; lfsr FSR2,letter
3631 ;; movff rel_pressure+0,lo
3632 ;; movff rel_pressure+1,hi
3633 ;; call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mBar]
3634 ;; bsf leftbind
3635 ;; bsf ignore_digit5 ; do not display 1cm depth
3636 ;; output_16dp d'3'
3637 ;; bcf leftbind
3638 ;; movlw .004
3639 ;; movwf wait_temp
3640 ;; movff wait_temp,0x086 ; left
3641 ;; movlw .049
3642 ;; movwf wait_temp
3643 ;; movff wait_temp,0x087 ; top
3644 ;; movlw .015
3645 ;; movwf wait_temp
3646 ;; movff wait_temp,0x088 ; heightmax
3647 ;; movff dd_oled_brightness_offset,wait_temp
3648 ;; movff wait_temp,0x089 ; oled_brightness_offset_const
3649 ;; call main_DD2_write_incon24
3650 ;; movlb b'00000001' ; Back to Bank1
3651 ;; return
3652 ;;
3653 ;;PLED_MultiGF_deco_depth_actual:
3654 ;; lfsr FSR2,letter
3655 ;; movff char_O_actual_pointer,lo ; pointer to meter
3656 ;; movf lo,W
3657 ;; rlncf lo,F
3658 ;; addwf lo,F
3659 ;; movff char_O_actual_pointer,wait_temp ; test last_deco
3660 ;; decfsz wait_temp,F
3661 ;; bra PLED_MGF_skip_last_deco_depth
3662 ;; movff char_I_depth_last_deco,lo
3663 ;;PLED_MGF_skip_last_deco_depth:
3664 ;; output_99
3665 ;; movlw 'm'
3666 ;; movwf POSTINC2
3667 ;; movlw ' '
3668 ;; movwf POSTINC2
3669 ;; movlw .23
3670 ;; call PLED_SetColumn
3671 ;; movlw .57
3672 ;; call PLED_SetRow
3673 ;; goto word_processor
3674 ;;
3675 ;;PLED_MultiGF_gradient:
3676 ;; lfsr FSR2,letter
3677 ;; movff char_O_gradient_factor,lo
3678 ;; bsf leftbind
3679 ;; output_99
3680 ;; bcf leftbind
3681 ;; movlw '%'
3682 ;; movwf POSTINC2
3683 ;; movlw ' '
3684 ;; movwf POSTINC2
3685 ;; movlw .23
3686 ;; call PLED_SetColumn
3687 ;; movlw .49
3688 ;; call PLED_SetRow
3689 ;; goto word_processor
3690 ;;
3691 ;;PLED_MultiGF_time_at_deco:
3692 ;; movlw .045
3693 ;; movwf wait_temp
3694 ;; movff wait_temp,0x086 ; left
3695 ;; movlw .050
3696 ;; movwf wait_temp
3697 ;; movff wait_temp,0x087 ; top
3698 ;; movlw .015
3699 ;; movwf wait_temp
3700 ;; movff wait_temp,0x088 ; heightmax
3701 ;; movff dd_oled_brightness_offset,wait_temp
3702 ;; movff wait_temp,0x089 ; oled_brightness_offset_const
3703 ;; lfsr FSR2,letter
3704 ;; lfsr FSR0,0x250
3705 ;; movff char_O_actual_pointer,lo
3706 ;; movf lo,W
3707 ;; movff PLUSW0,lo
3708 ;; bsf leftbind
3709 ;; output_99
3710 ;; movlw '<' ; Textmapping to "'"!
3711 ;; movwf POSTINC2
3712 ;; call main_DD2_write_incon24
3713 ;; movlb b'00000001' ; Back to Bank1
3714 ;; return
3715 ;;
3716 ;;PLED_MultiGF_clear_behind_depth:
3717 ;; movlw 0x01
3718 ;; movwf wait_temp
3719 ;; movff wait_temp,width ; font select left side before decpoint
3720 ;; movff wait_temp,box_temp+5 ; font select right side decpoint and after
3721 ;; movlw .063
3722 ;; movwf wait_temp
3723 ;; movff wait_temp,box_temp+1 ; bottom row
3724 ;; movlw .020
3725 ;; movwf wait_temp
3726 ;; movff wait_temp,box_temp+2 ; start column
3727 ;; movlw .063
3728 ;; movwf wait_temp
3729 ;; movff wait_temp,box_temp+3 ; end column
3730 ;; movlw .051
3731 ;; movwf wait_temp
3732 ;; movff wait_temp,box_temp+4 ; start column dec point
3733 ;; lfsr FSR2,letter
3734 ;;; call DD_Main
3735 ;; return
3736 ;;; movlw 0x31
3737 ;; movwf wait_temp
3738 ;; movff wait_temp,box_temp+1 ; row
3739 ;; movlw 0x00
3740 ;; movwf wait_temp
3741 ;; movff wait_temp,box_temp+0 ; color
3742 ;; call DD_hline
3743 ;; return
3744 ;;
3745 ;
3746 ;;PLED_MulitGF_nextentry_tissues:
3747 ;; lfsr FSR2,letter
3748 ;; lfsr FSR0,0x200
3749 ;; rlncf wait_temp,W
3750 ;; movff PLUSW0,lo
3751 ;; addlw .001
3752 ;; movff PLUSW0,hi
3753 ;; output_16
3754 ;; movlw ' '
3755 ;; movwf POSTINC2
3756 ;; movlw .8
3757 ;; subwf temp6,F
3758 ;; bnz PLED_MultiGF_column_ok_tissues
3759 ;; movlw b'00001111' ; gray code
3760 ;; movwf grayvalue
3761 ;; movlw .21
3762 ;; subwf temp5,F
3763 ;; bc PLED_MultiGF_new_row_tissues
3764 ;; return
3765 ;;PLED_MultiGF_new_row_tissues:
3766 ;; movlw .48
3767 ;; movwf temp6
3768 ;;PLED_MultiGF_column_ok_tissues:
3769 ;; movf temp5,W
3770 ;; call PLED_SetColumn
3771 ;; movlw .8
3772 ;; subwf temp6,W
3773 ;; call PLED_SetRow
3774 ;; call word_processor
3775 ;; bra PLED_MultiGF_loop_tissues
3776 ;;
3777 ;
3778 ;;PLED_MultiGF_uart_out:
3779 ;; call rs232_wait_tx
3780 ;;; header ff ff
3781 ;; movlw 0xff
3782 ;; movwf wait_temp
3783 ;; movff wait_temp,TXREG
3784 ;; call rs232_wait_tx
3785 ;; movff wait_temp,TXREG
3786 ;; call rs232_wait_tx
3787 ;;; 2sec counter
3788 ;; movff 0x290,TXREG
3789 ;; call rs232_wait_tx
3790 ;; movff 0x291,TXREG
3791 ;; call rs232_wait_tx
3792 ;;; movff ,TXREG
3793 ;;; pres_respiration
3794 ;; movff amb_pressure,TXREG
3795 ;; call rs232_wait_tx
3796 ;; movff amb_pressure+1,TXREG
3797 ;; call rs232_wait_tx
3798 ;;; pres_surface
3799 ;; movff last_surfpressure,TXREG
3800 ;; call rs232_wait_tx
3801 ;; movff last_surfpressure+1,TXREG
3802 ;; call rs232_wait_tx
3803 ;;; tissue pres
3804 ;; lfsr FSR0,0x200
3805 ;; movlw .64
3806 ;; movwf wait_temp
3807 ;;pled_multigraf_tissue_uart_loop:
3808 ;; movff POSTINC0,TXREG
3809 ;; call rs232_wait_tx
3810 ;; decfsz wait_temp
3811 ;; bra pled_multigraf_tissue_uart_loop
3812 ;;; movff ,TXREG
3813 ;;; call rs232_wait_tx
3814 ;; return
3815 ;
3816 ;;PLED_MulitGF_nextentry_debug:
3817 ;; lfsr FSR2,letter
3818 ;; movff wait_temp,lo
3819 ;; output_99
3820 ;; movlw 0x02
3821 ;; movwf POSTINC2
3822 ;; movlw ':'
3823 ;; movwf POSTINC2
3824 ;; movlw 0x02
3825 ;; movwf POSTINC2
3826 ;; lfsr FSR0,0x300
3827 ;; movf wait_temp,W
3828 ;; movff PLUSW0,lo
3829 ;; output_99
3830 ;; movlw ' '
3831 ;; movwf POSTINC2
3832 ;; movlw .8
3833 ;; subwf temp6,F
3834 ;; bnz PLED_MultiGF_column_ok_debug
3835 ;; movlw b'00001111' ; gray code
3836 ;; movwf grayvalue
3837 ;; movlw .21
3838 ;; subwf temp5,F
3839 ;; bc PLED_MultiGF_new_row_debug
3840 ;; return
3841 ;;PLED_MultiGF_new_row_debug:
3842 ;; movlw .48
3843 ;; movwf temp6
3844 ;;PLED_MultiGF_column_ok_debug:
3845 ;; movf temp5,W
3846 ;; call PLED_SetColumn
3847 ;; movlw .8
3848 ;; subwf temp6,W
3849 ;; call PLED_SetRow
3850 ;; call word_processor
3851 ;; bra PLED_MultiGF_loop_debug
3852 ;
3853 ;;PLED_MultiGF_calc_tissue_counter:
3854 ;; movlw d'8' ; gray code
3855 ;; movwf grayvalue
3856 ;; movff 0x290,lo
3857 ;; movff 0x291,hi
3858 ;; movlw '('
3859 ;; movwf POSTINC2
3860 ;; output_16
3861 ;; movlw ')'
3862 ;; movwf POSTINC2
3863 ;; movlw .8
3864 ;; subwf temp6,F
3865 ;; bnz PLED_MGF_ok_col_calc_tis_cter
3866 ;; movlw b'00001111' ; gray code
3867 ;; movwf grayvalue
3868 ;; movlw .21
3869 ;; subwf temp5,F
3870 ;; bc PLED_MGF_n_row_calc_tis_cter
3871 ;; return
3872 ;;PLED_MGF_n_row_calc_tis_cter:
3873 ;; movlw .48
3874 ;; movwf temp6
3875 ;;PLED_MGF_ok_col_calc_tis_cter:
3876 ;; movf temp5,W
3877 ;; call PLED_SetColumn
3878 ;; movlw .8
3879 ;; subwf temp6,W
3880 ;; call PLED_SetRow
3881 ;; call word_processor
3882 ;; bra PLED_MGF_lp_calc_tis_counter
3883 ;;
3884 ;
3885 ;;PLED_debug_deko:
3886 ;; movlw .009
3887 ;; call PLED_SetColumn
3888 ;; movlw .008
3889 ;; call PLED_SetRow
3890 ;; lfsr FSR2,letter
3891 ;; movff char_O_deco_status,lo
3892 ;; output_8
3893 ;; call word_processor
3894 ;;
3895 ;; movlw .009
3896 ;; call PLED_SetColumn
3897 ;; movlw .016
3898 ;; call PLED_SetRow
3899 ;; lfsr FSR2,letter
3900 ;; movff char_O_array_decodepth+0,lo
3901 ;; output_8
3902 ;; call word_processor
3903 ;; return
3904 ;;
3905 ;
3906 PLED_simdata_screen: ;Display Pre-Dive Screen 3407 PLED_simdata_screen: ;Display Pre-Dive Screen
3907 ; List active gases/Setpoints 3408 ; List active gases/Setpoints
3908 btfsc FLAG_const_ppO2_mode ; in ppO2 mode? 3409 btfsc FLAG_const_ppO2_mode ; in ppO2 mode?
3909 bra PLED_simdata_screen3 ; Yes, display SetPoint/Sensor result list 3410 bra PLED_simdata_screen3 ; Yes, display SetPoint/Sensor result list
3910 3411