当前位置:网站首页>《单片机原理与应用》——并行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取值范围如下所示:
边栏推荐
- Stack implementation calculator
- How can beginners correctly understand Google's official suggested architectural principles (questions?)
- Comprehensive experiment Li
- seaborn clustermap矩阵添加颜色块
- [no title] free test questions for constructor municipal direction general foundation (constructor) and theoretical test for constructor municipal direction general foundation (constructor) in 2022
- Rumtime 1200 upgrade: London upgrade support, pledge function update and more
- 使用threejs简单Web3D效果
- CPU设计实战-第四章实践任务一简单CPU参考设计调试
- P4 安装bmv2 详细教程
- [deep analysis of C language] - data storage in memory
猜你喜欢

Utiliser Beef pour détourner le navigateur utilisateur

Intelligent constant pressure irrigation system

Gateway-88

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

使用beef劫持用戶瀏覽器

shardingSphere

SPL Introduction (I)

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

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

Audio-AudioRecord create(一)
随机推荐
[force deduction 10 days SQL introduction] Day10 control flow
[no title] free test questions for constructor municipal direction general foundation (constructor) and theoretical test for constructor municipal direction general foundation (constructor) in 2022
Using settoolkit to forge sites to steal user information
Codeworks round 803 (Div. 2) VP supplement
Anddroid text to speech TTS implementation
shardingSphere
[getting started] input n integers and output the smallest K of them
Book of quantitative trading - reading notes of the man who conquers the market
栈实现计算器
To prevent "activation" photos from being muddled through, databao "live detection + face recognition" makes face brushing safer
The use of word in graduation thesis
[dynamic planning] p1020 missile interception (variant of the longest increasing subsequence)
SPL Introduction (I)
Mavros sends a custom topic message to Px4
程序员养生宝典
Adding color blocks to Seaborn clustermap matrix
2022 ordinary scaffolder (special type of construction work) examination question bank and the latest analysis of ordinary scaffolder (special type of construction work)
2022.2.15
golang中的正则表达式使用注意事项与技巧
Li Kou 1358 -- number of substrings containing all three characters (double pointer)