Mercurial > public > hwos_code
comparison src/adc_lightsensor.asm @ 270:bddb63835035
increase min input voltage from 1,2mV to 1,9mV (cR only)
author | heinrichsweikamp |
---|---|
date | Wed, 22 Apr 2015 16:03:31 +0200 |
parents | 6a1ac89e2098 |
children | 653a3ab08062 |
comparison
equal
deleted
inserted
replaced
269:1207cf9a9408 | 270:bddb63835035 |
---|---|
370 clrf o2_mv_sensor1+0 | 370 clrf o2_mv_sensor1+0 |
371 get_analog_inputs2a: | 371 get_analog_inputs2a: |
372 ; Ignore 1,2mV noise for not-connected inputs | 372 ; Ignore 1,2mV noise for not-connected inputs |
373 tstfsz o2_mv_sensor1+1 ; >25,5mV? | 373 tstfsz o2_mv_sensor1+1 ; >25,5mV? |
374 bra get_analog_inputs2 ; Yes, skip here | 374 bra get_analog_inputs2 ; Yes, skip here |
375 movlw .12 | 375 movlw .19 |
376 cpfsgt o2_mv_sensor1+0 ; >1,2mV? | 376 cpfsgt o2_mv_sensor1+0 ; >1,9mV? |
377 clrf o2_mv_sensor1+0 ; no, clear result | 377 clrf o2_mv_sensor1+0 ; no, clear result |
378 get_analog_inputs2: | 378 get_analog_inputs2: |
379 movlw b'00100101' ; power on ADC, select AN9 | 379 movlw b'00100101' ; power on ADC, select AN9 |
380 rcall wait_adc | 380 rcall wait_adc |
381 bcf STATUS,C | 381 bcf STATUS,C |
398 clrf o2_mv_sensor2+0 | 398 clrf o2_mv_sensor2+0 |
399 get_analog_inputs3a: | 399 get_analog_inputs3a: |
400 ; Ignore 1,2mV noise for not-connected inputs | 400 ; Ignore 1,2mV noise for not-connected inputs |
401 tstfsz o2_mv_sensor2+1 ; >25,5mV? | 401 tstfsz o2_mv_sensor2+1 ; >25,5mV? |
402 bra get_analog_inputs3 ; Yes, skip here | 402 bra get_analog_inputs3 ; Yes, skip here |
403 movlw .12 | 403 movlw .19 |
404 cpfsgt o2_mv_sensor2+0 ; >1,2mV? | 404 cpfsgt o2_mv_sensor2+0 ; >1,9mV? |
405 clrf o2_mv_sensor2+0 ; no, clear result | 405 clrf o2_mv_sensor2+0 ; no, clear result |
406 get_analog_inputs3: | 406 get_analog_inputs3: |
407 movlw b'00101001' ; power on ADC, select AN10 | 407 movlw b'00101001' ; power on ADC, select AN10 |
408 rcall wait_adc | 408 rcall wait_adc |
409 bcf STATUS,C | 409 bcf STATUS,C |
426 clrf o2_mv_sensor3+0 | 426 clrf o2_mv_sensor3+0 |
427 get_analog_inputs4a: | 427 get_analog_inputs4a: |
428 ; Ignore 1,2mV noise for not-connected inputs | 428 ; Ignore 1,2mV noise for not-connected inputs |
429 tstfsz o2_mv_sensor3+1 ; >25,5mV? | 429 tstfsz o2_mv_sensor3+1 ; >25,5mV? |
430 bra get_analog_inputs4 ; Yes, skip here | 430 bra get_analog_inputs4 ; Yes, skip here |
431 movlw .12 | 431 movlw .19 |
432 cpfsgt o2_mv_sensor3+0 ; >1,2mV? | 432 cpfsgt o2_mv_sensor3+0 ; >1,9mV? |
433 clrf o2_mv_sensor3+0 ; no, clear result | 433 clrf o2_mv_sensor3+0 ; no, clear result |
434 get_analog_inputs4: | 434 get_analog_inputs4: |
435 bcf ADCON0,0 ; power off ADC | 435 bcf ADCON0,0 ; power off ADC |
436 bcf adc_running ; =1: The ADC is in use | 436 bcf adc_running ; =1: The ADC is in use |
437 return | 437 return |