This book is a textbook written for the teaching of domestic single-chip microcomputer related courses. The book is divided into 15 chapters, and the main contents include: STC single-chip microcomputer introduction, numerical representation and operation, STC single-chip microcomputer CPU subsystem, STC single-chip microcomputer CPU instruction system, STC single-chip microcomputer assembly language programming model, STC single-chip microcomputer C language programming model, STC single-chip microcomputer clock, reset and power mode principle and implementation, STC single-chip microcomputer counter and timer principle and implementation, STC single-chip microcomputer CCP/PCA/PWM module principle and implementation, STC single-chip microcomputer serial asynchronous receiver principle and implementation, STC single-chip microcomputer SPI principle and implementation, STC single-chip microcomputer ADC principle and implementation, STC single-chip microcomputer enhanced PWM generator principle and implementation, STC single-chip microcomputer comparator principle and implementation, RTX51 operating system principle and implementation. Chapter 1 Introduction to STC MCU 1.1 MCU Basics 1.1.1 MCU Development History 1.1.2 MCU Concept 1.1.3 MCU and Embedded System 1.1.4 MCU Programming Language 1.2 Introduction to STC MCU 1.2.1 STC MCU Development History 1.2.2 STC MCU IAP and ISP 1.2.3 STC MCU naming rules 1.2.4 STC MCU package types 1.3 STC MCU development process 1.3.1 Hardware design process 1.3.2 Software design process 1.4 STC MCU structure and function 1.5 STC MCU pin signal Chapter 2 Numerical representation and conversion 2.1 Common code system 2.1.1 Binary code system 2.1.2 Decimal code system 2.1.3 Octal code system 2.1.4 Hexadecimal code system 2.1.5 BCD code 2.2 Positive number representation method 2.2.1 Representation of positive integers 2.2.2 Representation of positive decimals 2.3 Positive number system conversion 2.3.1 Convert decimal integers to other bases 2.3.2 Convert decimal decimals to binary numbers 2.4 Negative numbers Representation method 2.5 Calculation of negative complement 2.5.1 Calculation of negative integer complement 2.5.2 Calculation of negative decimal complement 2.6 Fixed-point representation 2.7 Floating-point representation Chapter 3 STC MCU CPU subsystem 3.1 STC MCU CPU core functional unit 3.1.1 Controller 3.1.2 Arithmetic unit 3.1.3 Special function register 3.2 STC MCU memory structure and address space 3.2.1 Program Flash memory 3.2.2 Data Flash memory 3.2.3 Internal data RAM memory 3.2.4 External data memory 3.3 STC MCU interrupt system principle and function 3.3.1 Interrupt principle 3.3.2 Interrupt system structure 3.3.3 Interrupt priority 3.3.4 Interrupt priority control register 3.3.5 Interrupt vector table Chapter 4 STC MCU CPU instruction system 4.1 STC MCU CPU addressing mode 4.1.1 Immediate addressing mode 4.1.2 Direct addressing mode 4.1.3 Indirect addressing mode 4.1.4 Register addressing mode 4.1.5 Relative addressing mode 4.1.6 Indexed addressing mode 4.1.7 Bit addressing mode 4.2 STC MCU CPU instruction set 4.2.1 Arithmetic instructions 4.2.2 Logical instructions 4.2.3 Data transfer instructions 4.2.4 Boolean instructions 4.2.5 Program branch instructions Chapter 5 STC MCU assembly language programming model 5.1 Assembly language program structure 5.2 Assembly code segment 5.2.1CODE segment 5.2.2BIT segment 5.2.3IDATA segment 5.2.4DATA segment 5.2.5XDATA segment 5.3 Assembly language symbols and rules 5.3.1Symbol naming rules 5.3.2Symbol functions 5.4Assembly language operand description 5.4.1Numbers 5.4.2Characters 5.4.3Strings 5.4.4Location counters 5.4.5Operators 5.4.6Expressions 5.5Assembly language control description 5.5.1Address control 5.5.2Conditional assembly 5.5.3Memory initialization 5.5.4Allocate memory space 5.5.5Procedure declaration 5.5.6Program linking 5.5.7Segment control 5.5.8Miscellaneous 5.6Introduction to Keil μVision integrated development environment 5.6.1Software functions 5.6.2Software download 5.6.3Software installation 5.6.4Software startup 5.7Keil μVision5 Assembly Language Design Process 5.7.1 Create a New Design Project 5.7.2 Add a New Assembly Language File 5.7.3 Create a Design 5.7.4 Analyze .m51 File 5.7.5 Analyze .lst File 5.7.6 Analyze .hex File 5.7.7 Program Software Simulation 5.7.8 STC Hardware Platform Description 5.7.9 Program Hardware Simulation 5.8 MCU Port Control Assembly Language Programming 5.8.1 Design Principle 5.8.2 Create a New Project 5.8.3 Add an Assembly Language Program 5.8.4 Create a Design 5.8.5 Download a Design 5.9 MCU Interrupt Assembly Language Programming 5.9.1 Design Principle 5.9.2 Create a New Project 5.9.3 Add an Assembly Language File 5.9.4 Analyze .lst File 5.9.5 Create a Design 5.9.6 Download a Design 5.9.7 Hardware Simulation Chapter 6 STC MCU C Language Programming Model 6.1 C Language Development History 6.2 C Language Advantages 6.3 Design the First C Program 6 .3.1 Create a new design project 6.3.2 Add a new C language file 6.3.3 C language program structure 6.3.4 Design creation 6.3.5 Design operation and analysis 6.4 Constants and variables 6.4.1 Constants 6.4.2 Variables 6.5 Data types 6.5.1 Types supported by standard C language 6.5.2 Types extended by MCU 6.5.3 User-defined data types 6.5.4 Variables and storage modes 6.6 Operators 6.6.1 Assignment operator 6.6.2 Arithmetic operations 6.6.3 Increment and decrement operators 6.6.4 Relational operators 6.6.5 Logical operators 6.6.6 Bitwise operators 6.6.7 Compound assignment operators 6.6.8 Comma operator 6.6.9 Conditional operators 6.6.10 Type conversion operators 6.6.11 sizeof operator 6.7 Description statements 6.7.1 Input/output statements 6.7.2 Expression statements 6.7.3 Conditional statements 6.7.4 Switch statements 6.7.5 Loop statements 6.7.6 Return statements 6.8 Arrays 6.8.1 One-dimensional array representation 6.8.2 Multidimensional array representation 6.8.3 Index array element method 6.8.4 Dynamic array element input method 6.8.5 Array operation algorithm 6.9 Pointers 6.9.1 Basic concepts of pointers 6.9.2 Pointers to pointers 6.9.3 Pointer variable input 6.10 Functions 6.10.1 Function declaration 6.10.2 Function call 6.10.3 Function variable storage method 6.10.4 Function parameters 6.10.5 Basic data type parameter passing 6.10.6 Array type parameter passing 6.10.7 Pointer type parameter passing 6.11 Preprocessing directives 6.11.1 Macro definition 6.11.2 File inclusion 6.11.3 Conditional compilation 6.11.4 Other preprocessing directives 6.12 Complex data structures 6.12.1 Structures 6.12.2 Unions 6.12.3 Enumerations 6.13 Using assembly language in C programs 6.13.1 Inline assembly language 6 .13.2 Calling the assembly program 6.14 C language port control implementation 6.15 C language interrupt program implementation 6.15.1 C language interrupt program implementation principle 6.15.2 External interrupt circuit principle 6.15.3 C language interrupt specific implementation process Chapter 7 STC microcontroller clock, reset and power mode principle and implementation 7.1 STC microcontroller clock 7.2 STC microcontroller reset 7.2.1 External RST pin reset 7.2.2 Software reset 7.2.3 Power-off/power-on reset 7.2.4 MAX810 dedicated reset circuit reset 7.2.5 Internal low voltage detection reset 7.2.6 Watchdog reset 7.2.7 Program address illegal reset 7.3 STC microcontroller power mode 7.3.1 Low speed mode 7.3.2 Idle mode 7.3.3 Power-off mode Chapter 8 STC microcontroller counter and timer principle and implementation 8.1 Introduction to counter/timer module 8.2 Counter/timer register group 8.2.1 Timer/counter 0/1 control register TCON 8.2.2 Timer/Counter Operating Mode Register TMOD 8.2.3 Auxiliary Register AUXR 8.2.4T0~T2 clock output register and external interrupt enable INT_CLKO (AUXR2) 8.2.5 Timer T0 and T1 interrupt enable control register IE 8.2.6 Timer T0 and T1 interrupt priority control register IP 8.2.7 Timer T4 and timer T3 control register T4T3M 8.2.8 Timer T2, T3 and T4 interrupt control register IE2 8.3 Counter/Timer Working Mode Principle and Implementation 8.3.1 Timer/Counter 0 Working Mode 8.3.2 Timer/Counter 1 Working Mode 8.3.3 Timer/Counter 2 Working Mode 8.3.4 Timer/Counter 3 Working Mode 8.3.5 Timer/Counter 4 Working Mode Chapter 9 STC MCU CCP/PCA/PWM Module Principle and Implementation 9.1 CCP/PCA/PWM Structure 9.2 CCP/PCA/PWM Register Group 9.2.1 PCA Working Mode Register 9.2.2 PCA Control Register 9.2.3 PCA Compare Capture Register 9.2.4 PCA 16-bit Counter 9.2.5 PCA Capture/Compare Register 9.2.6 PCA Module PWM Register 9.2.7 PCA Module Pin Switch Register 9.3 CCP/PCA/PWM working mode 9.3.1 Capture mode 9.3.2 16-bit software timer mode 9.3.3 High-speed pulse output mode 9.3.4 Pulse width modulation mode Chapter 10 Principle and implementation of STC microcontroller serial asynchronous receiver and transmitter 10.1 Introduction to RS-232 standard 10.1.1 RS-232 transmission characteristics 10.1.2 RS-232 data transmission format 10.1.3 RS-232 electrical standard 10.1.4 RS-232 parameter setting 10.1.5 RS-232 connector 10.2 Introduction to STC microcontroller serial port module 10.2.1 Serial port module structure 10.2.2 Serial port pins 10.3 Serial port 1 registers and working modes 10.3.1 Serial port 1 register group 10.3.2 Serial port 1 working mode 10.3.3 Serial port 1 communication example 1 10.3.4 Serial port 1 communication example 2 10.4 Serial port 2 registers and working modes 10.4.1 Serial port 2 register group 10.4.2 Serial port 2 working mode 10.5 Serial port 3 registers and working modes 10.5.1 Serial port 3 register group 10.5.2 Serial port 3 working mode 10.6 Serial port 4 registers and working modes 10.6.1 Serial port 4 register group 10.6.2 Serial port 4 working mode 10.7 Serial communication comprehensive implementation 10.7.1 Circuit principle of infrared transceiver 10.7.2 Infrared communication waveform capture 10.7.3 Infrared communication protocol 10.7.4 Infrared detection principle 10.7.5 Serial communication principle 10.7 .6 Design and Implementation Chapter 11 STC MCU SPI Principle and Implementation 11.1 SPI Module Structure and Function 11.1.1 SPI Transmission Characteristics 11.1.2 SPI Module Function 11.1.3 SPI Interface Signal 11.1.4 SPI Interface Data Communication Mode 11.1.5 SPI Module Internal Structure 11.2 SPI Module Register Group 11.2.1 SPI Control Register 11.2.2 SPI Status Register 11.2.3 SPI Data Register 11.2.4 Interrupt Enable Register 11.2.5 Interrupt Priority Register 11.2.6 Control SPI Pin Position register 11.3 SPI module configuration and timing 11.3.1 SPI configuration mode 11.3.2 Notes on master/slave mode 11.3.3 Modify mode through SS 11.3.4 Write conflict 11.3.5 Data mode timing 11.4 SPI module design example 11.4.1 System control circuit principle 11.4.2 7-segment digital tube principle 11.4.3 74HC595 principle 11.4.4 System software control flow 11.4.5 Specific implementation of the program Chapter 12 STC microcontroller ADC principle and implementation 12.1 Analog-to-digital converter principle 12.1.1 Analog-to-digital converter Parameters 12.1.2 Types of analog-to-digital converters 12.2 Principle of the structure of the ADC in the STC microcontroller 12.2.1 Structure of the ADC in the STC microcontroller 12.2.2 Calculation method of ADC conversion results 12.3 ADC register group in the STC microcontroller 12.3.1 P1 port analog function control register 12.3.2 ADC control register 12.3.3 Clock division register 12.3.4 ADC result high register 12.3.5 ADC result low register 12.3.6 Interrupt enable register 12.3.7 Interrupt priority register 12.4 ADC application implementation 1 12.4.1 Principle of DC voltage divider circuit 12.4.2 Software design process 12.4.3 Specific implementation process 12.5 ADC application implementation 2 12.5.1 Hardware circuit design 12.5.2 1602 character LCD principle 12.5.3 Software design process 12.5.4 Specific implementation process 12.6 ADC application implementation 3 12.6.1 Hardware circuit design 12.6.2 12864 graphic dot matrix LCD principle 12.6.3 Software design process 12.6.4 ADC external input signal requirements 12.6.5 Specific implementation process 12.7 ADC application implementation 4 Chapter 13 Principle and Implementation of STC Microcontroller Enhanced PWM Generator 13.1 Introduction to Enhanced PWM Generator 13.2 Enhanced PWM Generator Related Register Group 13.2.1 Port Configuration Register 13.2.2 PWM Configuration Register 13.2.3 PWM Control Register 13.2.4 PWM Interrupt Flag Register 13.2.5 PWM External Abnormal Control Register 13.2.6 PWM Counter 13.2.7 PWM Clock Selection Register 13.2.8 PWM2 Flip Counter 13.2.9 PWM2 Control Register 13 .2.10 PWM3 Flip Counter 13.2.11 PWM3 Control Register 13.2.12 PWM4 Flip Counter 13.2.13 PWM4 Control Register 13.2.14 PWM5 Flip Counter 13.2.15 PWM5 Control Register 13.2.16 PWM6 Flip Counter 13.2.17 PWM6 Control Register 13.2.18 PWM7 Flip Counter 13.2.19 PWM7 Control Register 13.2.20 PWM Interrupt Priority Control Register 13.3 Enhanced PWM Generator Implementation 1 13.4 Enhanced PWM Generator Implementation 2 Chapter 14 STC MCU Comparator Principle and Implementation 14.1 STC MCU Comparator Structure 14.2 STC MCU Comparator Register Group 14.2.1 Comparator Control Register 1 14.2.2 Comparator Control Register 2 14.3 STC MCU Comparator Application Chapter 15 RTX51 Operating System Principle and Implementation 15.1 Necessity of Operating System 15.1.1 Single Task Program 15.1.2 Polling Program 15.2 Basic Knowledge of Operating System 15.2.1 The Role of Operating System 15.2.2 Functions of Operating System 15.3 Tasks of RTX51 Operating System 15.3.1 Defining Tasks 15.3.2 Managing Tasks 15.3.3 Switching Tasks 15.4 RTX51 Operating System Kernel Functions 15.5 RTX51 Operating System Implementation 15.5.1 RTX51 Operating System Implementation 1 15.5.2 RTX51 Operating System Implementation 2 15.5.3 RTX51 Operating System Implementation 36 PCA module PWM register 9.2.7 PCA module pin switching register 9.3 CCP/PCA/PWM working mode 9.3.1 Capture mode 9.3.2 16-bit software timer mode 9.3.3 High-speed pulse output mode 9.3.4 Pulse width modulation mode Chapter 10 STC microcontroller serial asynchronous receiver and transmitter principle and implementation 10.1 Introduction to RS-232 standard 10.1.1 RS-232 transmission characteristics 10.1.2 RS-232 data transmission format 10.1.3 RS-232 electrical standard 10.1.4 RS-232 parameter setting 10.1.5 RS-232 connector 10.2 Introduction to STC microcontroller serial port module 10.2.1 Serial port module structure 10.2.2 Serial port pin 10.3 Serial port 1 register and working mode 10.3.1 Serial port 1 register group 10.3.2 Serial port 1 working mode 10.3.3 Serial port 1 communication example 1 10.3.4 Serial Port 1 Communication Example 2 10.4 Serial Port 2 Registers and Working Modes 10.4.1 Serial Port 2 Register Group 10.4.2 Serial Port 2 Working Mode 10.5 Serial Port 3 Registers and Working Modes 10.5.1 Serial Port 3 Register Group 10.5.2 Serial Port 3 Working Mode 10.6 Serial Port 4 Registers and Working Modes 10.6.1 Serial Port 4 Register Group 10.6.2 Serial Port 4 Working Mode 10.7 Serial Communication Comprehensive Implementation 10.7.1 Circuit Principle of Infrared Transceiver 10.7.2 Infrared Communication Waveform Capture 10.7.3 Infrared Communication Protocol 10.7.4 Infrared Detection Principle 10.7.5 Serial Communication Principle 10.7 .6 Design and Implementation Chapter 11 STC MCU SPI Principle and Implementation 11.1 SPI Module Structure and Function 11.1.1 SPI Transmission Characteristics 11.1.2 SPI Module Function 11.1.3 SPI Interface Signal 11.1.4 SPI Interface Data Communication Mode 11.1.5 SPI Module Internal Structure 11.2 SPI Module Register Group 11.2.1 SPI Control Register 11.2.2 SPI Status Register 11.2.3 SPI Data Register 11.2.4 Interrupt Enable Register 11.2.5 Interrupt Priority Register 11.2.6 Control SPI Pin Position register 11.3 SPI module configuration and timing 11.3.1 SPI configuration mode 11.3.2 Notes on master/slave mode 11.3.3 Modify mode through SS 11.3.4 Write conflict 11.3.5 Data mode timing 11.4 SPI module design example 11.4.1 System control circuit principle 11.4.2 7-segment digital tube principle 11.4.3 74HC595 principle 11.4.4 System software control flow 11.4.5 Specific implementation of the program Chapter 12 STC microcontroller ADC principle and implementation 12.1 Analog-to-digital converter principle 12.1.1 Analog-to-digital converter Parameters 12.1.2 Types of analog-to-digital converters 12.2 Principle of the structure of the ADC in the STC microcontroller 12.2.1 Structure of the ADC in the STC microcontroller 12.2.2 Calculation method of ADC conversion results 12.3 ADC register group in the STC microcontroller 12.3.1 P1 port analog function control register 12.3.2 ADC control register 12.3.3 Clock division register 12.3.4 ADC result high register 12.3.5 ADC result low register 12.3.6 Interrupt enable register 12.3.7 Interrupt priority register 12.4 ADC application implementation 1 12.4.1 Principle of DC voltage divider circuit 12.4.2 Software design process 12.4.3 Specific implementation process 12.5 ADC application implementation 2 12.5.1 Hardware circuit design 12.5.2 1602 character LCD principle 12.5.3 Software design process 12.5.4 Specific implementation process 12.6 ADC application implementation 3 12.6.1 Hardware circuit design 12.6.2 12864 graphic dot matrix LCD principle 12.6.3 Software design process 12.6.4 ADC external input signal requirements 12.6.5 Specific implementation process 12.7 ADC application implementation 4 Chapter 13 Principle and Implementation of STC Microcontroller Enhanced PWM Generator 13.1 Introduction to Enhanced PWM Generator 13.2 Enhanced PWM Generator Related Register Group 13.2.1 Port Configuration Register 13.2.2 PWM Configuration Register 13.2.3 PWM Control Register 13.2.4 PWM Interrupt Flag Register 13.2.5 PWM External Abnormal Control Register 13.2.6 PWM Counter 13.2.7 PWM Clock Selection Register 13.2.8 PWM2 Flip Counter 13.2.9 PWM2 Control Register 13 .2.10 PWM3 Flip Counter 13.2.11 PWM3 Control Register 13.2.12 PWM4 Flip Counter 13.2.13 PWM4 Control Register 13.2.14 PWM5 Flip Counter 13.2.15 PWM5 Control Register 13.2.16 PWM6 Flip Counter 13.2.17 PWM6 Control Register 13.2.18 PWM7 Flip Counter 13.2.19 PWM7 Control Register 13.2.20 PWM Interrupt Priority Control Register 13.3 Enhanced PWM Generator Implementation 1 13.4 Enhanced PWM Generator Implementation 2 Chapter 14 STC MCU Comparator Principle and Implementation 14.1 STC MCU Comparator Structure 14.2 STC MCU Comparator Register Group 14.2.1 Comparator Control Register 1 14.2.2 Comparator Control Register 2 14.3 STC MCU Comparator Application Chapter 15 RTX51 Operating System Principle and Implementation 15.1 Necessity of Operating System 15.1.1 Single Task Program 15.1.2 Polling Program 15.2 Basic Knowledge of Operating System 15.2.1 The Role of Operating System 15.2.2 Functions of Operating System 15.3 Tasks of RTX51 Operating System 15.3.1 Defining Tasks 15.3.2 Managing Tasks 15.3.3 Switching Tasks 15.4 RTX51 Operating System Kernel Functions 15.5 RTX51 Operating System Implementation 15.5.1 RTX51 Operating System Implementation 1 15.5.2 RTX51 Operating System Implementation 2 15.5.3 RTX51 Operating System Implementation 36 PCA module PWM register 9.2.7 PCA module pin switching register 9.3 CCP/PCA/PWM working mode 9.3.1 Capture mode 9.3.2 16-bit software timer mode 9.3.3 High-speed pulse output mode 9.3.4 Pulse width modulation mode Chapter 10 STC microcontroller serial asynchronous receiver and transmitter principle and implementation 10.1 Introduction to RS-232 standard 10.1.1 RS-232 transmission characteristics 10.1.2 RS-232 data transmission format 10.1.3 RS-232 electrical standard 10.1.4 RS-232 parameter setting 10.1.5 RS-232 connector 10.2 Introduction to STC microcontroller serial port module 10.2.1 Serial port module structure 10.2.2 Serial port pin 10.3 Serial port 1 register and working mode 10.3.1 Serial port 1 register group 10.3.2 Serial port 1 working mode 10.3.3 Serial port 1 communication example 1 10.3.4 Serial Port 1 Communication Example 2 10.4 Serial Port 2 Registers and Working Modes 10.4.1 Serial Port 2 Register Group 10.4.2 Serial Port 2 Working Mode 10.5 Serial Port 3 Registers and Working Modes 10.5.1 Serial Port 3 Register Group 10.5.2 Serial Port 3 Working Mode 10.6 Serial Port 4 Registers and Working Modes 10.6.1 Serial Port 4 Register Group 10.6.2 Serial Port 4 Working Mode 10.7 Serial Communication Comprehensive Implementation 10.7.1 Circuit Principle of Infrared Transceiver 10.7.2 Infrared Communication Waveform Capture 10.7.3 Infrared Communication Protocol 10.7.4 Infrared Detection Principle 10.7.5 Serial Communication Principle 10.7 .6 Design and Implementation Chapter 11 STC MCU SPI Principle and Implementation 11.1 SPI Module Structure and Function 11.1.1 SPI Transmission Characteristics 11.1.2 SPI Module Function 11.1.3 SPI Interface Signal 11.1.4 SPI Interface Data Communication Mode 11.1.5 SPI Module Internal Structure 11.2 SPI Module Register Group 11.2.1 SPI Control Register 11.2.2 SPI Status Register 11.2.3 SPI Data Register 11.2.4 Interrupt Enable Register 11.2.5 Interrupt Priority Register 11.2.6 Control SPI Pin Position register 11.3 SPI module configuration and timing 11.3.1 SPI configuration mode 11.3.2 Notes on master/slave mode 11.3.3 Modify mode through SS 11.3.4 Write conflict 11.3.5 Data mode timing 11.4 SPI module design example 11.4.1 System control circuit principle 11.4.2 7-segment digital tube principle 11.4.3 74HC595 principle 11.4.4 System software control flow 11.4.5 Specific implementation of the program Chapter 12 STC microcontroller ADC principle and implementation 12.1 Analog-to-digital converter principle 12.1.1 Analog-to-digital converter Parameters 12.1.2 Types of analog-to-digital converters 12.2 Principle of the structure of the ADC in the STC microcontroller 12.2.1 Structure of the ADC in the STC microcontroller 12.2.2 Calculation method of ADC conversion results 12.3 ADC register group in the STC microcontroller 12.3.1 P1 port analog function control register 12.3.2 ADC control register 12.3.3 Clock division register 12.3.4 ADC result high register 12.3.5 ADC result low register 12.3.6 Interrupt enable register 12.3.7 Interrupt priority register 12.4 ADC application implementation 1 12.4.1 Principle of DC voltage divider circuit 12.4.2 Software design process 12.4.3 Specific implementation process 12.5 ADC application implementation 2 12.5.1 Hardware circuit design 12.5.2 1602 character LCD principle 12.5.3 Software design process 12.5.4 Specific implementation process 12.6 ADC application implementation 3 12.6.1 Hardware circuit design 12.6.2 12864 graphic dot matrix LCD principle 12.6.3 Software design process 12.6.4 ADC external input signal requirements 12.6.5 Specific implementation process 12.7 ADC application implementation 4 Chapter 13 Principle and Implementation of STC Microcontroller Enhanced PWM Generator 13.1 Introduction to Enhanced PWM Generator 13.2 Enhanced PWM Generator Related Register Group 13.2.1 Port Configuration Register 13.2.2 PWM Configuration Register 13.2.3 PWM Control Register 13.2.4 PWM Interrupt Flag Register 13.2.5 PWM External Abnormal Control Register 13.2.6 PWM Counter 13.2.7 PWM Clock Selection Register 13.2.8 PWM2 Flip Counter 13.2.9 PWM2 Control Register 13 .2.10 PWM3 Flip Counter 13.2.11 PWM3 Control Register 13.2.12 PWM4 Flip Counter 13.2.13 PWM4 Control Register 13.2.14 PWM5 Flip Counter 13.2.15 PWM5 Control Register 13.2.16 PWM6 Flip Counter 13.2.17 PWM6 Control Register 13.2.18 PWM7 Flip Counter 13.2.19 PWM7 Control Register 13.2.20 PWM Interrupt Priority Control Register 13.3 Enhanced PWM Generator Implementation 1 13.4 Enhanced PWM Generator Implementation 2 Chapter 14 STC MCU Comparator Principle and Implementation 14.1 STC MCU Comparator Structure 14.2 STC MCU Comparator Register Group 14.2.1 Comparator Control Register 1 14.2.2 Comparator Control Register 2 14.3 STC MCU Comparator Application Chapter 15 RTX51 Operating System Principle and Implementation 15.1 Necessity of Operating System 15.1.1 Single Task Program 15.1.2 Polling Program 15.2 Basic Knowledge of Operating System 15.2.1 The Role of Operating System 15.2.2 Functions of Operating System 15.3 Tasks of RTX51 Operating System 15.3.1 Defining Tasks 15.3.2 Managing Tasks 15.3.3 Switching Tasks 15.4 RTX51 Operating System Kernel Functions 15.5 RTX51 Operating System Implementation 15.5.1 RTX51 Operating System Implementation 1 15.5.2 RTX51 Operating System Implementation 2 15.5.3 RTX51 Operating System Implementation 33 SPI module configuration and timing 11.3.1 SPI configuration mode 11.3.2 Notes on master/slave mode 11.3.3 Modify mode through SS 11.3.4 Write conflict 11.3.5 Data mode timing 11.4 SPI module design example 11.4.1 System control circuit principle 11.4.2 7-segment digital tube principle 11.4.3 74HC595 principle 11.4.4 System software control flow 11.4.5 Specific implementation of the program Chapter 12 STC microcontroller ADC principle and implementation 12.1 Analog-to-digital converter principle 12.1.1 Parameters of analog-to-digital converter 12 .1.2 Types of analog-to-digital converters 12.2 STC MCU ADC structure principle 12.2.1 STC MCU ADC structure 12.2.2 ADC conversion result calculation method 12.3 STC MCU ADC register group 12.3.1 P1 port analog function control register 12.3.2 ADC control register 12.3.3 Clock division register 12.3.4 ADC result high register 12.3.5 ADC result low register 12.3.6 Interrupt enable register 12.3.7 Interrupt priority register 12.4 ADC application implementation 1 12.4.1 Principle of DC voltage divider circuit 12.4.2 Software design process 12.4.3 Specific implementation process 12.5 ADC application implementation 2 12.5.1 Hardware circuit design 12.5.2 1602 character LCD principle 12.5.3 Software design process 12.5.4 Specific implementation process 12.6 ADC application implementation 3 12.6.1 Hardware circuit design 12.6.2 12864 graphic dot matrix LCD principle 12.6.3 Software design process 12.6.4 ADC external input signal requirements 12.6.5 Specific implementation process 12.7 ADC application implementation 4 Chapter 13 Principle and Implementation of STC Microcontroller Enhanced PWM Generator 13.1 Introduction to Enhanced PWM Generator 13.2 Enhanced PWM Generator Related Register Group 13.2.1 Port Configuration Register 13.2.2 PWM Configuration Register 13.2.3 PWM Control Register 13.2.4 PWM Interrupt Flag Register 13.2.5 PWM External Abnormal Control Register 13.2.6 PWM Counter 13.2.7 PWM Clock Selection Register 13.2.8 PWM2 Flip Counter 13.2.9 PWM2 Control Register 13 .2.10 PWM3 Flip Counter 13.2.11 PWM3 Control Register 13.2.12 PWM4 Flip Counter 13.2.13 PWM4 Control Register 13.2.14 PWM5 Flip Counter 13.2.15 PWM5 Control Register 13.2.16 PWM6 Flip Counter 13.2.17 PWM6 Control Register 13.2.18 PWM7 Flip Counter 13.2.19 PWM7 Control Register 13.2.20 PWM Interrupt Priority Control Register 13.3 Enhanced PWM Generator Implementation 1 13.4 Enhanced PWM Generator Implementation 2 Chapter 14 STC MCU Comparator Principle and Implementation 14.1 STC MCU Comparator Structure 14.2 STC MCU Comparator Register Group 14.2.1 Comparator Control Register 1 14.2.2 Comparator Control Register 2 14.3 STC MCU Comparator Application Chapter 15 RTX51 Operating System Principle and Implementation 15.1 Necessity of Operating System 15.1.1 Single Task Program 15.1.2 Polling Program 15.2 Basic Knowledge of Operating System 15.2.1 The Role of Operating System 15.2.2 Functions of Operating System 15.3 Tasks of RTX51 Operating System 15.3.1 Defining Tasks 15.3.2 Managing Tasks 15.3.3 Switching Tasks 15.4 RTX51 Operating System Kernel Functions 15.5 RTX51 Operating System Implementation 15.5.1 RTX51 Operating System Implementation 1 15.5.2 RTX51 Operating System Implementation 2 15.5.3 RTX51 Operating System Implementation 33 SPI module configuration and timing 11.3.1 SPI configuration mode 11.3.2 Notes on master/slave mode 11.3.3 Modify mode through SS 11.3.4 Write conflict 11.3.5 Data mode timing 11.4 SPI module design example 11.4.1 System control circuit principle 11.4.2 7-segment digital tube principle 11.4.3 74HC595 principle 11.4.4 System software control flow 11.4.5 Specific implementation of the program Chapter 12 STC microcontroller ADC principle and implementation 12.1 Analog-to-digital converter principle 12.1.1 Parameters of analog-to-digital converter 12 .1.2 Types of analog-to-digital converters 12.2 STC MCU ADC structure principle 12.2.1 STC MCU ADC structure 12.2.2 ADC conversion result calculation method 12.3 STC MCU ADC register group 12.3.1 P1 port analog function control register 12.3.2 ADC control register 12.3.3 Clock division register 12.3.4 ADC result high register 12.3.5 ADC result low register 12.3.6 Interrupt enable register 12.3.7 Interrupt priority register 12.4 ADC application implementation 1 12.4.1 Principle of DC voltage divider circuit 12.4.2 Software design process 12.4.3 Specific implementation process 12.5 ADC application implementation 2 12.5.1 Hardware circuit design 12.5.2 1602 character LCD principle 12.5.3 Software design process 12.5.4 Specific implementation process 12.6 ADC application implementation 3 12.6.1 Hardware circuit design 12.6.2 12864 graphic dot matrix LCD principle 12.6.3 Software design process 12.6.4 ADC external input signal requirements 12.6.5 Specific implementation process 12.7 ADC application implementation 4 Chapter 13 Principle and Implementation of STC Microcontroller Enhanced PWM Generator 13.1 Introduction to Enhanced PWM Generator 13.2 Enhanced PWM Generator Related Register Group 13.2.1 Port Configuration Register 13.2.2 PWM Configuration Register 13.2.3 PWM Control Register 13.2.4 PWM Interrupt Flag Register 13.2.5 PWM External Abnormal Control Register 13.2.6 PWM Counter 13.2.7 PWM Clock Selection Register 13.2.8 PWM2 Flip Counter 13.2.9 PWM2 Control Register 13 .2.10 PWM3 Flip Counter 13.2.11 PWM3 Control Register 13.2.12 PWM4 Flip Counter 13.2.13 PWM4 Control Register 13.2.14 PWM5 Flip Counter 13.2.15 PWM5 Control Register 13.2.16 PWM6 Flip Counter 13.2.17 PWM6 Control Register 13.2.18 PWM7 Flip Counter 13.2.19 PWM7 Control Register 13.2.20 PWM Interrupt Priority Control Register 13.3 Enhanced PWM Generator Implementation 1 13.4 Enhanced PWM Generator Implementation 2 Chapter 14 STC MCU Comparator Principle and Implementation 14.1 STC MCU Comparator Structure 14.2 STC MCU Comparator Register Group 14.2.1 Comparator Control Register 1 14.2.2 Comparator Control Register 2 14.3 STC MCU Comparator Application Chapter 15 RTX51 Operating System Principle and Implementation 15.1 Necessity of Operating System 15.1.1 Single Task Program 15.1.2 Polling Program 15.2 Basic Knowledge of Operating System 15.2.1 The Role of Operating System 15.2.2 Functions of Operating System 15.3 Tasks of RTX51 Operating System 15.3.1 Defining Tasks 15.3.2 Managing Tasks 15.3.3 Switching Tasks 15.4 RTX51 Operating System Kernel Functions 15.5 RTX51 Operating System Implementation 15.5.1 RTX51 Operating System Implementation 1 15.5.2 RTX51 Operating System Implementation 2 15.5.3 RTX51 Operating System Implementation 3
You Might Like
Recommended ContentMore
Open source project More
Popular Components
Searched by Users
Just Take a LookMore
Trending Downloads
Trending ArticlesMore