beautypg.com

2 voltage reference for external devices, 3 control register, 1 adc control and status register b- adcsrb – Rainbow Electronics ATmega64C1 User Manual

Page 257

background image

257

7647A–AVR–02/08

ATmega32/64/M1/C1

19.2.2

Voltage Reference for External Devices

An external resistor used in conjunction with the Current Source can be used as voltage refer-
ence for external devices. Using a resistor in serie with a lower tolerance than the Current
Source accuracy (

2%) is recommended.

Table 19-2

gives an example of voltage references

using standard values of resistors.

19.2.3

Threshold Reference for Internal Analog Comparator

An external resistor used in conjunction with the Current Source can be used as threshold refer-
ence for internal Analog Comparator (

See ”Analog Comparator” on page 258.

). This can be

connected to AIN0 (negative Analog Compare input pin) as well as AIN1 (positive Analog Com-
pare input pin). Using a resistor in serie with a lower tolerance than the Current Source accuracy
(

2%) is recommended.

Table 19-2

gives an example of threshold references using standard

values of resistors.

19.3

Control Register

19.3.1

ADC Control and Status Register B– ADCSRB

• Bit 6 – ISRCEN: Current Source Enable

Set this bit to source a 100µA current to the AREF pin.
Clear this bit to disconnect .

• Bit 5 – AREFEN: Analog Reference pin Enable

Set this bit to connect the internal AREF circuit to the AREF pin.
Clear this bit to disconnect the internal AREF circuit from the AREF pin.

Bit

7

6

5

4

3

2

1

0

ADHSM

ISRCEN

AREFEN

-

ADTS3

ADTS2

ADTS1

ADTS0

ADCSRB

Read/Write

R/W

R/W

R/W

R

R/W

R/W

R/W

R/W

Initial Value

0

0

0

0

0

0

0

0