当前位置:网站首页>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 :
边栏推荐
- When using charts to display data, the time field in the database is repeated. How to display the value at this time?
- Use threejs simple Web3D effect
- P4 安装bmv2 详细教程
- shardingSphere
- TypeError: __init__() got an unexpected keyword argument ‘autocompletion‘
- Provincial election + noi Part III tree problems
- Yolov5 advanced six target tracking environment construction
- Leetcode T34: 在排序数组中查找元素的第一个和最后一个位置
- Yolov5进阶之七目标追踪最新环境搭建
- Leetcode t40: combined sum II
猜你喜欢

What is 1cr0.5mo (H) material? 1cr0.5mo (H) tensile yield strength

Koltin35, headline Android interview algorithm

機動目標跟踪——當前統計模型(CS模型)擴展卡爾曼濾波/無迹卡爾曼濾波 matlab實現
![[getting started] intercepting strings](/img/16/363baa4982408f55493057200bcba5.png)
[getting started] intercepting strings

SPL-安装与基本使用(二)

一套十万级TPS的IM综合消息系统的架构实践与思考

The era of low threshold programmers is gone forever behind the sharp increase in the number of school recruitment for Internet companies

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

【华为机试真题详解】判断字符串子序列【2022 Q1 Q2 | 200分】
![[untitled]](/img/d9/5e97f2de256b9749131b5bf1437d24.png)
[untitled]
随机推荐
On June 30, 2022, the record of provincial competition + national competition of Bluebridge
Provincial selection + noi Part II string
2022 Chinese cook (technician) simulation test and Chinese cook (technician) practice test video
Programmer's regimen
15Mo3 German standard steel plate 15Mo3 chemical composition 15Mo3 mechanical property analysis of Wuyang Steel Works
XX攻击——反射型 XSS 攻击劫持用户浏览器
機動目標跟踪——當前統計模型(CS模型)擴展卡爾曼濾波/無迹卡爾曼濾波 matlab實現
leetcode T31:下一排列
2022 ordinary scaffolder (special type of construction work) examination question bank and the latest analysis of ordinary scaffolder (special type of construction work)
[untitled]
串口转WIFI模块通信
0 basic introduction to single chip microcomputer: how to use digital multimeter and precautions
Embedded-c language-10-enumeration / (function) pointer (function) / multi-level pointer /malloc dynamic allocation / file operation
【js逆向】md5加密参数破解
2022.6.30 省赛+蓝桥国赛记录
[Yu Yue education] Shandong Vocational College talking about railway reference materials
Advanced API
[JS reverse] MD5 encryption parameter cracking
Tita OKR: a dashboard to master the big picture
How to prevent the other party from saying that he has no money after winning the lawsuit?