Mercurial > public > hwos_code
comparison src/adc_lightsensor.asm @ 451:66049b6f2c0b
speedup analog presses
author | heinrichsweikamp |
---|---|
date | Thu, 01 Sep 2016 13:24:17 +0200 |
parents | aadfe9f2edaf |
children | 025a0ce21f8b |
comparison
equal
deleted
inserted
replaced
450:791a25c4aab4 | 451:66049b6f2c0b |
---|---|
521 movwf batt_percent | 521 movwf batt_percent |
522 return | 522 return |
523 | 523 |
524 global get_analog_switches | 524 global get_analog_switches |
525 get_analog_switches: ; starts ADC and waits until finished | 525 get_analog_switches: ; starts ADC and waits until finished |
526 return | |
527 btfsc analog_switches | 526 btfsc analog_switches |
528 bra get_analog_switches2 | 527 bra get_analog_switches2 |
529 ; no analog switches | 528 ; no analog switches |
530 bcf analog_sw2_pressed | 529 bcf analog_sw2_pressed |
531 bcf analog_sw1_pressed | 530 bcf analog_sw1_pressed |
564 sw1_pressed: | 563 sw1_pressed: |
565 bsf analog_sw1_pressed | 564 bsf analog_sw1_pressed |
566 get_analog_sw_done: | 565 get_analog_sw_done: |
567 movlw b'10001101' ; Restore to right justified | 566 movlw b'10001101' ; Restore to right justified |
568 movwf ADCON2 | 567 movwf ADCON2 |
569 return | 568 btfsc analog_sw1_pressed |
570 | 569 return |
570 btfsc analog_sw2_pressed | |
571 return | |
572 setf TMR1H ; No button pressed, enhance timer1 to overflow quickly | |
573 return | |
571 | 574 |
572 END | 575 END |