Attiny11/12 – Rainbow Electronics ATtiny12 User Manual

Page 40

Advertising
background image

40

ATtiny11/12

1006C–09/01

• Bit 3 - ACIE: Analog Comparator Interrupt Enable

When the ACIE bit is set (one) and the I-bit in the Status Register is set (one), the Ana-
log Comparator Interrupt is activated. When cleared (zero), the interrupt is disabled.

• Bit 2 - Res: Reserved Bit

This bit is a reserved bit in the ATtiny11/12 and will always read as zero.

• Bits 1,0 - ACIS1, ACIS0: Analog Comparator Interrupt Mode Select

These bits determine which comparator events that trigger the Analog Comparator Inter-
rupt. The different settings are shown in Table 18.

Note:

When changing the ACIS1/ACIS0 bits, the Analog Comparator Interrupt must be dis-
abled by clearing its interrupt enable bit in the ACSR register. Otherwise, an interrupt can
occur when the bits are changed.

Caution: Using the SBI or CBI instruction on bits other than ACI in this register will write
a one back into ACI if it is read as set, thus clearing the flag.

Table 18. ACIS1/ACIS0 Settings

ACIS1

ACIS0

Interrupt Mode

0

0

Comparator Interrupt on Output Toggle

0

1

Reserved

1

0

Comparator Interrupt on Falling Output Edge

1

1

Comparator Interrupt on Rising Output Edge

Advertising