11.07.2015 Views

ATMega chip full datasheet - UCSD Department of Physics

ATMega chip full datasheet - UCSD Department of Physics

ATMega chip full datasheet - UCSD Department of Physics

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ATmega48A/PA/88A/PA/168A/PA/328/P• Bit 5 – ADATE: ADC Auto Trigger EnableWhen this bit is written to one, Auto Triggering <strong>of</strong> the ADC is enabled. The ADC will start a conversionon a positive edge <strong>of</strong> the selected trigger signal. The trigger source is selected by settingthe ADC Trigger Select bits, ADTS in ADCSRB.• Bit 4 – ADIF: ADC Interrupt FlagThis bit is set when an ADC conversion completes and the Data Registers are updated. TheADC Conversion Complete Interrupt is executed if the ADIE bit and the I-bit in SREG are set.ADIF is cleared by hardware when executing the corresponding interrupt handling vector. Alternatively,ADIF is cleared by writing a logical one to the flag. Beware that if doing a Read-Modify-Write on ADCSRA, a pending interrupt can be disabled. This also applies if the SBI and CBIinstructions are used.• Bit 3 – ADIE: ADC Interrupt EnableWhen this bit is written to one and the I-bit in SREG is set, the ADC Conversion Complete Interruptis activated.• Bits 2:0 – ADPS[2:0]: ADC Prescaler Select BitsThese bits determine the division factor between the system clock frequency and the input clockto the ADC.Table 24-5.ADC Prescaler SelectionsADPS2 ADPS1 ADPS0 Division Factor0 0 0 20 0 1 20 1 0 40 1 1 81 0 0 161 0 1 321 1 0 641 1 1 1288271D–AVR–05/11266

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!