Mercurial > public > hwos_code
comparison src/adc_lightsensor.asm @ 465:025a0ce21f8b
BUGFIX: Minor layout corrections in imperial units dive screen
author | heinrichsweikamp |
---|---|
date | Fri, 18 Nov 2016 10:49:32 +0100 |
parents | 66049b6f2c0b |
children | 7f4c3b2e6bb7 |
comparison
equal
deleted
inserted
replaced
464:0491a84fd0b8 | 465:025a0ce21f8b |
---|---|
539 movwf ADCON1 | 539 movwf ADCON1 |
540 movlw b'00100101' ; power on ADC, select AN9 | 540 movlw b'00100101' ; power on ADC, select AN9 |
541 rcall wait_adc | 541 rcall wait_adc |
542 movff ADRESH,analog_sw2 | 542 movff ADRESH,analog_sw2 |
543 bcf analog_sw2_pressed | 543 bcf analog_sw2_pressed |
544 movlw .64 ; lower limit | 544 ; movlw .64 ; lower limit |
545 cpfsgt ADRESH | 545 ; cpfsgt ADRESH |
546 bra sw2_pressed | 546 ; bra sw2_pressed |
547 movlw .192 ; upper limit | 547 movlw .140 ; upper limit |
548 cpfsgt ADRESH | 548 cpfsgt ADRESH |
549 bra get_analog_sw1 | 549 bra get_analog_sw1 |
550 sw2_pressed: | 550 sw2_pressed: |
551 bsf analog_sw2_pressed | 551 bsf analog_sw2_pressed |
552 get_analog_sw1: | 552 get_analog_sw1: |
553 movlw b'00101001' ; power on ADC, select AN10 | 553 movlw b'00101001' ; power on ADC, select AN10 |
554 rcall wait_adc | 554 rcall wait_adc |
555 movff ADRESH,analog_sw1 | 555 movff ADRESH,analog_sw1 |
556 bcf analog_sw1_pressed | 556 bcf analog_sw1_pressed |
557 movlw .64 ; lower limit | 557 ; movlw .64 ; lower limit |
558 cpfsgt ADRESH | 558 ; cpfsgt ADRESH |
559 bra sw1_pressed | 559 ; bra sw1_pressed |
560 movlw .192 ; upper limit | 560 movlw .140 ; upper limit |
561 cpfsgt ADRESH | 561 cpfsgt ADRESH |
562 bra get_analog_sw_done | 562 bra get_analog_sw_done |
563 sw1_pressed: | 563 sw1_pressed: |
564 bsf analog_sw1_pressed | 564 bsf analog_sw1_pressed |
565 get_analog_sw_done: | 565 get_analog_sw_done: |