Bitwise and Logical Operators in Embedded C: A Practical Guide
In embedded systems programming, understanding low-level operations like bitwise and logical operators is essential for efficient memory usage and hardware control. Below is a practical explanation of common operators such as |, &, <<, >>, &&, ||, ++i, and i++, along with illustrative code examples.
Data Types and Binary ...
Posted on Sun, 04 Oct 2026 16:24:57 +0000 by d_mc_a
STM32 FSMC Configuration and External SRAM Memory Management
STM32F4 series microcontrollers integrate limited internal SRAM and Flash memory. Complex applications requiring large data buffers or graphic frames often exceed these internal capacities, necessitating the integration of external memory. While SDRAM offers high density, the STM32F407 lacks native SDRAM support, relying instead on the Flexible ...
Posted on Wed, 30 Sep 2026 16:02:59 +0000 by fourteen00
STM32 I2C Communication with MPU6050 Sensor: Software and Hardware Implementations
I2C Communication Fundamentals
The primary objective of I2C communication is to enable a microcontroller to read from and write to external module registers. This requires implementing at least two core functions: writing to a specific register address and reading from a specific register address.
Asynchronous timing advantages: Saves one clock ...
Posted on Thu, 24 Sep 2026 16:52:36 +0000 by Graphi
STM32F103 GPIO Programming Fundamentals
STM32F103 GPIO Programming Fundamentals
Overview
In the previous article, we discussed the reset and clock configuration for the STM32F103C8T6 minimal system. At this point, the system clock (SYSCLK) has been configured to 72MHz through a 9x multiplication of the external 8MHz high-speed oscillator (HSE) using the PLL. With the minimal system ...
Posted on Sun, 20 Sep 2026 16:28:21 +0000 by jack bro
Implementing Real-Time Clock Interfaces in HarmonyOS Hardware Drivers
Core Functionality
The Real-Time Clock (RTC) module serves as the temporal backbone for embedded operating systems. It maintains accurate system time and supports scheduled alarm events. Leveraging an external backup power source, the RTC preserves timekeeping operations during system shutdowns. Upon power restoration, it synchronizes the OS cl ...
Posted on Sun, 20 Sep 2026 16:06:53 +0000 by jevman
STM32 Micro-ROS Integration with STM32CubeIDE
Setting Up Micro-ROS in STM32CubeIDE
Begin by adding the following Micro-ROS source files to your project's Core/Src directory:
extra_sources/microros_time.c
extra_sources/microros_allocators.c
extra_sources/custom_memory_manager.c
extra_sources/microros_transports/dma_transport.c
After copying these files, right-click on your project in ST ...
Posted on Thu, 17 Sep 2026 16:38:10 +0000 by dclamp
Managing Time Zone Challenges in International Embedded Systems
Developing embedded systems for international markets introduces complexities in time management and character encoding. A significant issue arises when devices designed for one specific region are deployed globally, as hardcoded time offsets result in incorrect local time display.For instance, a device originally configured for the China Stand ...
Posted on Mon, 14 Sep 2026 16:28:09 +0000 by OldWolf
Integrating RT-Thread Nano with STM32F407 Using LL Drivers
CubeMX Configuration
Configure the STM32F407 project in STM32CubeMX with required peripherals (e.g., USART1 for console) and generate code using the Low-Layer (LL) drivers instead of HAL.
Code Modifications
Include RT-Thread Header
In source files that use RT-Thread APIs, add:
#include <rtthread.h>
Declare System Clock Function
In ma ...
Posted on Sat, 12 Sep 2026 16:40:14 +0000 by gilijk
8051 Microcontroller Peripheral Interfacing: RTC, Sensors, and Communication Protocols
DS1302 Real-Time Clock Implementation
The DS1302 communicates via a three-wire synchronous serial interface consisting of Clock (CLK), Data (IO), and Chip Enable (CE) lines. The device stores time data in Binary-Coded Decimal (BCD) format, requiring conversion for standard decimal display.
BCD Conversion Logic:
Decimal to BCD: bcd_value = (dec ...
Posted on Sat, 12 Sep 2026 16:22:53 +0000 by 3rve
DW_apb_uart Configuration and Data Transmission
Initialization Sequence
Configuring the DW_apb_uart for data transmission and reception requires a specific sequence of register writes. The standard setup procedure is outlined below:
Set up the Modem Control Register (MCR) to define operational modes such as SIR, automatic flow control, loopback, and modem output states.
Enable divisor latch ...
Posted on Fri, 11 Sep 2026 16:51:45 +0000 by MasK