Rev. 1.10
140
October 23, 2020
Rev. 1.10
141
October 23, 2020
BC66F5652
2.4GHz RF Transceiver A/D Flash MCU
BC66F5652
2.4GHz RF Transceiver A/D Flash MCU
mov a,SADOL ; read low byte conversion result value
mov SADOL_buffer,a ; save result to user defined register
mov a,SADOH ; read high byte conversion result value
mov SADOH_buffer,a ; save result to user defined register
:
:
EXIT_INT_ISR:
mov a,status_stack
mov STATUS,a ; restore STATUS from user defined memory
mov a,acc_stack ; restore ACC from user defined memory
reti
Comparator
An analog comparator is contained within the device. The comparator function offers flexibility
via their register controlled features such as power-down, polarity select, hysteresis etc. In sharing
their pins with normal I/O pins the comparators do not waste precious I/O pins if there functions are
otherwise unused.
+
−
CMPEN
CMPPOL
CMPO
One Shot
Comparator
Interrupt
CMPHYEN
CX Pin
Pin-shared selection
Pin-shared
selection
C-
C+
CMP
Comparator
Comparator Operation
The device contains a comparator function which is used to compare two analog voltages and
provide an output based on their input difference.
Any pull-high resistors connected to the shared comparator input pins will be automatically
disconnected when the corresponding comparator functional pins are selected. As the comparator
inputs approach their switching level, some spurious output signals may be generated on the
comparator output due to the slow rising or falling nature of the input signals. This can be minimised
by the hysteresis function which will apply a small amount of positive feedback to the comparator.
Ideally the comparator should switch at the point where the positive and negative inputs signals are
at the same voltage level. However, unavoidable input offsets introduce some uncertainties here.
The hysteresis function will also increases the switching offset value. The hysteresis window will be
changed for different comparator response time selections. The comparator response time is shown
in the comparator electrical characteristics.
Comparator Registers
Full control over each internal comparator is provided via the control register, CMPC. The
comparator output is recorded via a bit in the respective control register, but can also be transferred
out onto a shared I/O pin. Additional comparator functions include output polarity, response tine and
power down control.