STM8L151C8
AI

The **STM8L151C8** is an 8-bit ultra-low-power microcontroller (MCU) belonging to the STM8L EnergyLite series by STMicroelectronics. It is designed specifically for battery-operated applications where power efficiency is the primary priority.
---
## 1. Core Technical Specifications
Below are the primary electronic characteristics and memory configurations of the STM8L151C8.
| Feature | Specification |
| :--- | :--- |
| **Architecture** | 8-bit STM8 Core |
| **Max Clock Speed** | 16 MHz |
| **Flash Memory** | 64 KB |
| **RAM** | 4 KB |
| **Data EEPROM** | 2 KB |
| **Operating Voltage** | 1.65 V to 3.6 V |
| **Package** | LQFP48 (7x7 mm) |
| **I/O Pins** | 41 usable GPIOs |
---
## 2. Ultra-Low-Power Features
This MCU is renowned for its power management capabilities, utilizing multiple modes to conserve energy:
* **Low Power Run:** 5.1 µA (at 32 kHz).
* **Halt Mode:** 350 nA (SRAM content preserved).
* **Active-halt with RTC:** 1.3 µA.
* **Fast Wake-up:** Returns from Halt to Run mode in 5 µs.
---
## 3. Peripheral Set
The STM8L151C8 includes a robust set of analog and digital peripherals:
### Analog Components
* **ADC:** 12-bit Analog-to-Digital Converter with up to 25 channels.
* **DAC:** 12-bit Digital-to-Analog Converter.
* **Comparators:** 2 ultra-low-power comparators.
### Communication Interfaces
* **SPI:** 1 interface (up to 8 Mbit/s).
* **I2C:** 1 interface (up to 400 kHz).
* **USART:** 3 interfaces (with Smartcard and IrDA support).
### Timers and Control
* **Advanced Control Timer:** 16-bit timer for motor control or PWM.
* **General Purpose Timers:** Two 16-bit timers and one 8-bit timer.
* **RTC:** Real-time clock with calendar and alarm.
---
## 4. Hardware Connectivity
To interface with the STM8L151C8, you typically use the **SWIM (Single Wire Interface Module)** protocol for programming and debugging.
### Pinout Example (Partial)
```c
// Example of Pin Mapping in Code
#define LED_PORT GPIOC
#define LED_PIN GPIO_Pin_7
void main(void) {
// Initialize GPIO for Output
GPIO_Init(LED_PORT, LED_PIN, GPIO_Mode_Out_PP_Low_Fast);
while (1) {
GPIO_WriteReverse(LED_PORT, LED_PIN);
Delay(1000);
}
}
```
---
## 5. Typical Applications
* Medical hand-held devices (glucose meters, heart rate monitors).
* Wireless sensor nodes (LoRa/Sigfox end-devices).
* Smart meters (water, gas, and electricity).
* PC peripherals and battery-powered toys.
- ⤷What are the differences between the STM8S and STM8L series?
- ⤷ How do I set up the SWIM interface for programming?
- ⤷ What is the maximum current consumption in Full Run mode?