Atmel AT90PWM2 Manual page 230

8-bit avr microcontroller with 8k bytes in-system programmable flash
Table of Contents

Advertisement

20.2.4
Analog Comparator Status Register – ACSR
4317I–AVR–01/08
• Bit 6– AC2IE: Analog Comparator 2 Interrupt Enable bit
Set this bit to enable the analog comparator 2 interrupt.
Clear this bit to disable the analog comparator 2 interrupt.
• Bit 5, 4– AC2IS1, AC2IS0: Analog Comparator 2 Interrupt Select bit
These 2 bits determine the sensitivity of the interrupt trigger.
The different setting are shown in
Table 20-5.
Interrupt sensitivity selection
AC2IS1
AC2IS0
0
0
0
1
1
0
1
1
• Bit 2, 1, 0– AC2M2, AC2M1, AC2M0: Analog Comparator 2 Multiplexer register
These 3 bits determine the input of the negative input of the analog comparator.
The different setting are shown in
Table 20-6.
Analog Comparator 2 negative input selection
AC2M2
AC2M1
0
0
0
0
0
1
0
1
1
0
1
0
1
1
1
1
Bit
7
ACCKDIV
Read/Write
R/W
Initial Value
0
• Bit 7– ACCKDIV: Analog Comparator Clock Divider
The analog comparators can work with a clock up to 8MHz@3V and 16MHz@5V.
Set this bit in case the clock frequency of the microcontroller is higher than 8 MHz to insert a
divider by 2 between the clock of the microcontroller and the clock of the analog comparators.
Clear this bit to have the same clock frequency for the microcontroller and the analog
comparators.
• Bit 6– AC2IF: Analog Comparator 2 Interrupt Flag Bit
This bit is set by hardware when comparator 2 output event triggers off the interrupt mode
defined by AC2IS1 and AC2IS0 bits in AC2CON register.
This bit is cleared by hardware when the corresponding interrupt vector is executed in case the
Table
20-1.
Description
Comparator Interrupt on output toggle
Reserved
Comparator interrupt on output falling edge
Comparator interrupt on output rising edge
Table
20-6.
AC2M0
Description
0
"Vref"/6.40
1
"Vref"/3.20
0
"Vref"/2.13
1
"Vref"/1.60
0
Analog Comparator Negative Input (ACMPM pin)
1
DAC result
0
Reserved
1
Reserved
6
5
4
AC2IF
AC1IF
AC0IF
R/W
R/W
R/W
0
0
0
AT90PWM2/3/2B/3B
3
2
1
-
AC2O
AC1O
-
R
R
0
0
0
0
AC0O
ACSR
R
0
231

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the AT90PWM2 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

At90pwm3At90pwm2bAt90pwm3b

Table of Contents