当前位置:网站首页>《单片机原理与应用》——并行IO口原理
《单片机原理与应用》——并行IO口原理
2022-07-01 08:21:00 【涛涛呐~】
系列文章目录
提示:以下是本篇文章正文内容,下面案例可供参考
一、单片机并行IO口工作原理
P1口:
P1的IO并行内部结构是由D触发器和锁存器组成
内部总线输入0,触发器输出Q’为1,MOS管导通,输出端输出0;
内部输入1,触发器输出Q’为0,MOS管截至,输出端输出1;
那PI口作为输入端口读取数据就要用到锁存器,读取数据先要保持MOS管截至,则Q’输出0,于是P1口读取外部数据前先要像P1口输出1。
P3口:
P2口:
控制端(0),P2口的工作原理同P1口;
控制端为(1),P2口输出地址总线
P0口:
P0口需要用户外接上拉电阻才能正常工作。
控制端(0),P0作为普通IO口,工作原理同P1口
控制端(1),P0口作为地址/数据复用总线
二、51单片机工作周期和时序
1.时钟电路
无源石英晶体振荡器:
有源晶体振荡器:相对于无源,更加稳定可靠的时钟信号
2.复位方式
复位方式有:上电自动复位和手动按钮复位
3.机器周期和指令周期
机器周期:单片机操作的基本单位,一个机器周期包含有12个时钟周期。
指令周期:计算机取指令到执行完指令的时间为指令周期
三、C51新增的变量类型
特殊功能寄存器sfr定义
C51将单片机常用的特殊功能寄存器和特殊位进行定义,放在“reg51.h”头文件中。
位变量
变量在定义时指出变量的数据类型和存储器类型
四、函数的定义
增加了中断函数的定义
C51定义中断函数时候必须带的后缀名是interrupt m
m取值范围如下所示:
边栏推荐
- 防“活化”照片蒙混过关,数据宝“活体检测+人脸识别”让刷脸更安全
- TypeError: __init__() got an unexpected keyword argument ‘autocompletion‘
- 【js逆向】md5加密参数破解
- Anddroid text to speech TTS implementation
- Huawei machine test questions column subscription Guide
- What is the material of 15CrMoR, mechanical properties and chemical analysis of 15CrMoR
- Count number of rows per group and add result to original data frame
- 01 numpy introduction
- Provincial election + noi part I dynamic planning DP
- Why are some Wills made by husband and wife invalid
猜你喜欢

Using settoolkit to forge sites to steal user information

使用 setoolkit 伪造站点窃取用户信息
![[detailed explanation of Huawei machine test] judgment string subsequence [2022 Q1 Q2 | 200 points]](/img/0f/972cde8c749e7b53159c9d9975c9f5.png)
[detailed explanation of Huawei machine test] judgment string subsequence [2022 Q1 Q2 | 200 points]

网关gateway-88
![[getting started] enter the integer array and sorting ID, and sort its elements in ascending or descending order](/img/87/07783593dbabcf29700fa207ecda08.png)
[getting started] enter the integer array and sorting ID, and sort its elements in ascending or descending order

【js逆向】md5加密参数破解
![[getting started] intercepting strings](/img/16/363baa4982408f55493057200bcba5.png)
[getting started] intercepting strings

01 NumPy介绍

Koltin35, headline Android interview algorithm

Practice and Thinking on the architecture of a set of 100000 TPS im integrated message system
随机推荐
Agrometeorological environment monitoring system
Thread safety analysis of [concurrent programming JUC] variables
事务方法调用@Transactional
MATLAB【函数和图像】
seaborn clustermap矩阵添加颜色块
SPL installation and basic use (II)
Field agricultural irrigation system
[introduction] approximate value
程序员养生宝典
2022 examination summary of quality controller civil engineering direction post skills (quality controller) and reexamination examination of quality controller civil engineering direction post skills
防“活化”照片蒙混过关,数据宝“活体检测+人脸识别”让刷脸更安全
7-26 word length (input and output in the loop)
Serial port oscilloscope software ns-scope
Manually dig XSS vulnerabilities
AES简单介绍
Review of week 280 of leetcode
Yolov5进阶之七目标追踪最新环境搭建
【华为机试真题详解】判断字符串子序列【2022 Q1 Q2 | 200分】
View drawing process analysis
Huawei machine test questions column subscription Guide