Essential for Industrial Control: EEPROM Data Storage in PIC16F Microcontrollers (Includes Ready-to-Use Code)

In industrial control settings, microcontroller main control boards often need to store critical data such as calibration parameters, device addresses, and operation logs. —— These data must not be lost due to power outages, and the built-in PIC16F series microcontrollers’ EEPROM perfectly meets the core requirement of “long-term power-off data retention”. I have been engaged … Read more

Microcontroller ADC: Top Ten C Language Filtering Algorithms

1. Clipping Filter Method 1. Method: Determine the maximum allowable deviation between two samples based on experience (denote as A) When a new value is detected, determine: a. If the difference between the current value and the previous value <= A, then the current value is validb. If the difference between the current value and … Read more

Differences Between 51 Microcontroller and STM32 Microcontroller: Is STM32 More Powerful?

During live broadcasts, many students ask about the differences between the 51 microcontroller and the STM32 microcontroller, or which microcontroller is more powerful. Let’s look at this from several specific aspects. 1. Core Performance: The 51 microcontroller: is generally an 8-bit microcontroller. You can understand it as being able to process 8 bits of data … Read more

Kalman Filtering in Embedded Systems: A Comprehensive Guide

We know that sensor signals can sometimes be interfered with, causing fluctuations in the data readout. To eliminate this interference, engineers utilize various filtering algorithms. Today, I will discuss Kalman filtering. Part One: What is Kalman Filtering? In simple terms, Kalman filtering is an efficient recursive filter that can estimate the optimal state of a … Read more

A Beginner’s Guide to Microcontroller Programming — Understanding the Structure of C Code Files Using main.c/.h as an Example

“ This article serves as preparatory content for beginners in microcontroller development, explaining the structure of C language code files using main.c/.h as an example, to help newcomers quickly understand C language for microcontroller programming.” There are only two types of C language code files: source files with a .c suffix and header files with … Read more

Embedded Microcontroller Software Algorithms

Category 1: Basic Data Processing and Algorithms This type of algorithm is fundamental to programming, but in microcontrollers, special attention must be paid to efficiency and resource usage. Lookup Method Trigonometric Functions: For example, calculating sin/cos values when displaying waveforms. Non-linear Calibration: Such as temperature compensation for thermocouples and non-linear correction for sensors. Encoding and … Read more

Chapter 3: Assembly Language Instructions for AT89S52 Microcontroller

1. Fill in the blanks 1. (P64) Assembly language instructions for microcontrollers typically consist of opcodes and operands, and can also consist solely of opcodes. 2. (P68) In the base plus index addressing mode, the data pointer DPTR or program counter PC is used as the base register, and accumulator A is used as the … Read more

Chapter 2: Hardware Structure of the AT89S52 Microcontroller

1. Fill in the blanks 1. (P34) The AT89S52 microcontroller integrates the CPU, RAM, Flash ROM, timer/counter, multi-functional I/O ports, a “watchdog” timer, and an interrupt system, among other basic functional components, on a single chip. 2. (P34) The 8-bit CPU of the AT89S52 microcontroller includes an arithmetic logic unit and a controller. 3. (P35) … Read more

Chapter 1 Overview of Microcontrollers

1. Fill in the blanks 1. (P9) Microcontrollers are commonly referred to as Embedded Microcontroller Units (EMCU) or Microcontroller Units (MCU). 2. (P9) Microcontrollers utilize ultra-large scale integration technology to integrate functional components such as Central Processing Units (CPU), Random Access Memory (RAM), Read-Only Memory (ROM), Flash memory, parallel I/O interfaces,, serial communication interfaces, interrupt … Read more

Core Guide to Implementing I2C Master on FPGA (Part 2): Module Interface Design

▼ Follow for more valuable content “ Modern FPGA design typically adopts a “top-down” approach. We design the I2C master controller starting from the top-level functionality and interfaces. So how do we begin from the top-level design, gradually decompose the functionality, define the interfaces, and ultimately implement an I2C controller that supports multi-byte read/write, error … Read more