Datasheet
Functional overview STM8L151xx, STM8L152xx
20/131 DocID15962 Rev 13
3.10 Digital-to-analog converter (DAC)
12-bit DAC with output buffer
Synchronized update capability using TIM4
DMA capability
External triggers for conversion
Input reference voltage V
REF+
for better resolution
Note: DAC can be served by DMA1.
3.11 Ultra-low-power comparators
The medium-density STM8L15x embeds two comparators (COMP1 and COMP2) sharing
the same current bias and voltage reference. The voltage reference can be internal or
external (coming from an I/O).
One comparator with fixed threshold (COMP1).
One comparator rail to rail with fast or slow mode (COMP2). The threshold can be one
of the following:
– DAC output
– External I/O
– Internal reference voltage or internal reference voltage submultiple (1/4, 1/2, 3/4)
The two comparators can be used together to offer a window function. They can wake up
from Halt mode.
3.12 System configuration controller and routing interface
The system configuration controller provides the capability to remap some alternate
functions on different I/O ports. TIM4 and ADC1 DMA channels can also be remapped.
The highly flexible routing interface allows application software to control the routing of
different I/Os to the TIM1 timer input captures. It also controls the routing of internal analog
signals to ADC1, COMP1, COMP2, DAC and the internal reference voltage V
REFINT
. It also
provides a set of registers for efficiently managing the charge transfer acquisition sequence
(Section 3.13: Touchsensing).
3.13 Touchsensing
Medium density STM8L15xxx devices provide a simple solution for adding capacitive
sensing functionality to any application. Capacitive sensing technology is able to detect
finger presence near an electrode which is protected from direct touch by a dielectric
(example, glass, plastic). The capacitive variation introduced by a finger (or any conductive
object) is measured using a proven implementation based on a surface charge transfer
acquisition principle. It consists of charging the electrode capacitance and then transferring
a part of the accumulated charges into a sampling capacitor until the voltage across this
capacitor has reached a specific threshold. In Medium density STM8L15xxx devices, the
acquisition sequence is managed by software and it involves analog I/O groups and the
routing interface.