adc.inc
changeset 22 fd72c63b8db8
parent 20 87cd7b25a94d
child 32 7ceb76b5a104
equal deleted inserted replaced
21:95549ce0e3da 22:fd72c63b8db8
    31 
    31 
    32     ; Disable digital circuit for pin
    32     ; Disable digital circuit for pin
    33         ldi         r16, (1 << ADC_PIN)
    33         ldi         r16, (1 << ADC_PIN)
    34         sts         DIDR0, r16
    34         sts         DIDR0, r16
    35 
    35 
    36     ; Debug LED
       
    37         sbi         DDRD, PORTD7
       
    38         sbi         PORTD, PORTD7
       
    39 
       
    40     ; Done
    36     ; Done
    41         ret
    37         ret
    42 
    38 
    43 ADC_Interrupt:
    39 ADC_Interrupt:
    44     ; Off
       
    45         cbi         PORTD, PORTD7
       
    46     
       
    47     ; Done
    40     ; Done
    48         reti    
    41         reti    
    49 
    42 
    50 ;; Read the current 8-bit ADC sample 
    43 ;; Read the current 8-bit ADC sample 
    51 ; Returns value in r16
    44 ; Returns value in r16