![]() |
Mini51 BSP
V3.02.002
The Board Support Package for Mini51 Series
|
#include <Mini51Series.h>
Data Fields | |
__IO uint32_t | CMPCR [2] |
__IO uint32_t | CMPSR |
__IO uint32_t | CMPRVCR |
@addtogroup ACMP Analog Comparator Controller(ACMP) Memory Mapped Structure for ACMP Controller
Definition at line 156 of file Mini51Series.h.
ACMP_T::CMPCR |
Bits | Field | Descriptions |
[0] | ACMPEN | Analog Comparator Enable Control
0 = Analog Comparator Disabled. 1 = Analog Comparator Enabled. Note: Analog comparator output needs to wait 2 us stable time after this bit is set. |
[1] | ACMPIE | Analog Comparator 0 Interrupt Enable Control
0 = Interrupt function Disabled. 1 = Interrupt function Enabled. |
[2] | HYSEN | Analog Comparator Hysteresis Enable Control
0 = Hysteresis function Disabled. 1 = Hysteresis function Enabled. |
[4] | NEGSEL | Analog Comparator Negative Input Selection
0 = The source of the negative comparator input is from CPN pin. 1 = The source of the negative comparator input is from internal band-gap voltage or comparator reference voltage. |
[8] | RISING | Analog Comparator Rising Edge Trigger Enable Control
0 = Analog comparator rising edge trigger Disabled. 1 = Analog comparator rising edge trigger PWM or Timer Enabled. Note: The bit is only effective while analog comparator triggers PWM or Timer. |
[9] | FALLING | Analog Comparator Falling Edge Trigger Enable Control
0 = Analog comparator falling edge trigger Disabled. 1 = Analog comparator falling edge trigger PWM or Timer Enabled. Note: The bit is only effective while analog comparator triggers PWM or Timer. |
[30:29] | CPPSEL | Analog Comparator Positive Input Selection
|
Definition at line 313 of file Mini51Series.h.
ACMP_T::CMPRVCR |
Bits | Field | Descriptions |
[3:0] | CRVS | Comparator Reference Voltage Setting
Comparator reference voltage = AVDD * (1 / 6 + CRVS[3:0] / 24). |
[7] | OUT_SEL | CRV Module Output Selection
0 = Band-gap voltage. 1 = Internal comparator reference voltage. |
Definition at line 315 of file Mini51Series.h.
ACMP_T::CMPSR |
Bits | Field | Descriptions |
[0] | ACMPF0 | Analog Comparator 0 Flag
This bit is set by hardware whenever the comparator 0 output changes state. This will generate an interrupt if ACMPIE(ACMP_CR0[1]) = 1. 0 = Analog comparator 0 output does not change. 1 = Analog comparator 0 output changed. Note: Software can write 1 to clear this bit to 0. |
[1] | ACMPF1 | Analog Comparator 1 Flag
This bit is set by hardware whenever the comparator 1 output changes state. This will generate an interrupt if ACMPIE(ACMP_CR1[1]) = 1. 0 = Analog comparator 1 output does not change. 1 = Analog comparator 1 output changed. Note: Software can write 1 to clear this bit to 0. |
[2] | ACMPO0 | Analog Comparator 0 Output
Synchronized to the APB clock to allow reading by software. Cleared when the comparator 0 is disabled ACMPEN(ACMP_CR0[0]) = 0. 0 = Analog comparator 0 outputs 0. 1 = Analog comparator 0 outputs 1. |
[3] | ACMPO1 | Analog Comparator 1 Output
Synchronized to the APB clock to allow reading by software. Cleared when the comparator 1 is disabled ACMPEN(ACMP_CR1[0]) = 0. 0 = Analog comparator 1 outputs 0. 1 = Analog comparator 1 outputs 1. |
Definition at line 314 of file Mini51Series.h.