当前位置:网站首页>Principle and application of single chip microcomputer - principle of parallel IO port
Principle and application of single chip microcomputer - principle of parallel IO port
2022-07-01 08:32:00 【Waves ~】
List of articles
List of articles
Tips : The following is the main body of this article , The following cases can be used for reference
One 、 MCU parallel IO How mouth works
P1 mouth :
P1 Of IO The parallel internal structure is composed of D Trigger and latch
Internal bus input 0, Trigger output Q’ by 1,MOS The pipe is open , Output end output 0;
Internal input 1, Trigger output Q’ by 0,MOS Tube stop , Output end output 1;
that PI As the input port, the latch is used to read data , To read data, you must first keep MOS Tube stop , be Q’ Output 0, therefore P1 Before reading external data through the port, you should first look like P1 output 1.
P3 mouth :
P2 mouth :
Control terminal (0),P2 The working principle of the port is the same as P1 mouth ;
The control port is (1),P2 Port output address bus
P0 mouth :
P0 The port requires the user to connect an external pull-up resistor to work properly .
Control terminal (0),P0 As ordinary IO mouth , The working principle is the same as P1 mouth
Control terminal (1),P0 As the address / Data multiplexing bus
Two 、51 Working cycle and timing of single chip microcomputer
1. Clock circuit
Passive quartz crystal oscillator :
Active crystal oscillator : Relative to passive , More stable and reliable clock signal 
2. Reset mode
The reset methods are : Power on automatic reset and manual button reset
3. Machine cycle and instruction cycle
Machine cycle : The basic unit of single chip microcomputer operation , A machine cycle consists of 12 Clock cycles .
Instruction cycle : The time from the computer fetching the instruction to the execution of the instruction is Instruction cycle
3、 ... and 、C51 New variable type
special function register sfr Definition
C51 Define the special function registers and special bits commonly used by MCU , Put it in “reg51.h” Header file .
Bit variable
When defining a variable, it indicates the data type and memory type of the variable
Four 、 Definition of function
Added the definition of interrupt function
C51 When defining an interrupt function, the suffix must be interrupt m
m The value range is as follows :
边栏推荐
- How to use OKR as the leadership framework of marketing department
- Provincial election + noi Part III tree problems
- Intelligent constant pressure irrigation system
- Download jackson codehaus. org jar - downloading jackson. codehaus. org jar
- Luogu p1088 [noip2004 popularization group] Martians
- XX attack - reflective XSS attack hijacking user browser
- Yolov5进阶之七目标追踪最新环境搭建
- 数字转excel的字符串坐标
- Anddroid text to speech TTS implementation
- [深度剖析C语言] —— 数据在内存中的存储
猜你喜欢

There are many problems in sewage treatment, and the automatic control system of pump station is solved in this way

The data analyst will be ruined without project experience. These 8 project resources will not be taken away

MATLAB小技巧(23)矩阵分析--模拟退火

Embedded-c language-10-enumeration / (function) pointer (function) / multi-level pointer /malloc dynamic allocation / file operation

Learn reptiles for a month and earn 6000 a month? Tell you the truth about the reptile, netizen: I wish I had known it earlier
![[JS reverse] MD5 encryption parameter cracking](/img/06/0610045d287f646479d6eb5021a067.png)
[JS reverse] MD5 encryption parameter cracking

Manually dig XSS vulnerabilities

【华为机试真题详解】判断字符串子序列【2022 Q1 Q2 | 200分】
![Thread safety analysis of [concurrent programming JUC] variables](/img/f9/a3604bec6f7e5317dd2c578da73018.jpg)
Thread safety analysis of [concurrent programming JUC] variables

使用 setoolkit 伪造站点窃取用户信息
随机推荐
【Redis】一气呵成,带你了解Redis安装与连接
Adding color blocks to Seaborn clustermap matrix
Maneuvering target tracking -- current statistical model (CS model) extended Kalman filter / unscented Kalman filter matlab implementation
Rumtime 1200 upgrade: London upgrade support, pledge function update and more
Leetcode t31: prochain arrangement
[JS reverse] MD5 encryption parameter cracking
2022.6.30 省赛+蓝桥国赛记录
[redis] it takes you through redis installation and connection at one go
Provincial election + noi Part VII computational geometry
Connect timed out of database connection
Intelligent constant pressure irrigation system
getInputStream() has already been called for this request
Hijacking a user's browser with beef
How can beginners correctly understand Google's official suggested architectural principles (questions?)
[detailed explanation of Huawei machine test] judgment string subsequence [2022 Q1 Q2 | 200 points]
Stack implementation calculator
谈谈数字化转型的几个关键问题
Count number of rows per group and add result to original data frame
Find the nearest n-th power of 2
MAVROS发送自定义话题消息给PX4