C8051F302-GSR Silicon Labs, C8051F302-GSR Datasheet - Page 53

no-image

C8051F302-GSR

Manufacturer Part Number
C8051F302-GSR
Description
8-bit Microcontrollers - MCU 8KB 8ADC 14Pin MCU
Manufacturer
Silicon Labs
Datasheet

Specifications of C8051F302-GSR

Rohs
yes
Core
8051
Data Bus Width
8 bit
Processor Series
C8051
Comparator0 interrupts can be generated on both rising-edge and falling-edge output transitions. (For
Interrupt enable and priority control, see
is set to logic 1 upon a Comparator0 falling-edge interrupt, and the CP0RIF flag is set to logic 1 upon the
Comparator0 rising-edge interrupt. Once set, these bits remain set until cleared by software. The output
state of Comparator0 can be obtained at any time by reading the CP0OUT bit. Comparator0 is enabled by
setting the CP0EN bit to logic 1, and is disabled by clearing this bit to logic 0.
Bit7:
Bit6:
Bit5:
Bit4:
Bits3–2: CP0HYP1–0: Comparator0 Positive Hysteresis Control Bits.
Bits1–0: CP0HYN1–0: Comparator0 Negative Hysteresis Control Bits.
CP0EN
R/W
Bit7
CP0EN: Comparator0 Enable Bit.
0: Comparator0 Disabled.
1: Comparator0 Enabled.
CP0OUT: Comparator0 Output State Flag.
0: Voltage on CP0+ < CP0–.
1: Voltage on CP0+ > CP0–.
CP0RIF: Comparator0 Rising-Edge Interrupt Flag.
0: No Comparator0 Rising Edge Interrupt has occurred since this flag was last cleared.
1: Comparator0 Rising Edge Interrupt has occurred.
CP0FIF: Comparator0 Falling-Edge Interrupt Flag.
0: No Comparator0 Falling-Edge Interrupt has occurred since this flag was last cleared.
1: Comparator0 Falling-Edge Interrupt has occurred.
00: Positive Hysteresis Disabled.
01: Positive Hysteresis = 5 mV.
10: Positive Hysteresis = 10 mV.
11: Positive Hysteresis = 20 mV.
00: Negative Hysteresis Disabled.
01: Negative Hysteresis = 5 mV.
10: Negative Hysteresis = 10 mV.
11: Negative Hysteresis = 20 mV.
CP0OUT
Bit6
R
SFR Definition 7.1.
CP0RIF
R/W
Bit5
CP0FIF CP0HYP1 CP0HYP0 CP0HYN1 CP0HYN0 00000000
R/W
Bit4
Section “8.3. Interrupt Handler” on page
CPT0CN: Comparator0 Control
Rev. 2.9
R/W
Bit3
R/W
Bit2
C8051F300/1/2/3/4/5
R/W
Bit1
(bit addressable)
72). The CP0FIF flag
R/W
Bit0
SFR Address:
Reset Value
0xF8
53

Related parts for C8051F302-GSR