当前位置:网站首页>《单片机原理及应用》—定时器、串行通信和中断系统
《单片机原理及应用》—定时器、串行通信和中断系统
2022-07-01 08:21:00 【涛涛呐~】
一、并行IO口使用
51单片机有4组IO口,可以对IO口进行并行输入和并行输出8位数据,且IO口可以按位方式使用。
keil软件编程调试窗口如下:
二、定时器计数器工作原理及方式
51单片机内部有T0和T1两个定时器,也是加法计数器。
模式寄存器TMOD,控制定时器的工作模式

每个定时器有16位数据,
其中方式2是8位自动置位计数器,高八位可以自动装载初值;
方式3只有定时/计数器T0才有。
三、定时器/计数器的编程
1、采用查询方式处理

2、采用中断方式

单片机定时器最多可以定时65536us,可以用集合软件计数和定时器实现大于65536us的定时;
四、串行通讯
根据信息传送的方向分为:单工、半双工和全双工三种
分为串行通信和并行通信;分为同步通信和异步通信
高速串行通信一般采用同步通信;
51单片机是标准的数字电路芯片,其输入输出引脚符合TTL电平规则(高电平为3-5V,低电平为0-1V)
为提高串行通信的可靠性,人们定义了各种新的通信电平标准,形成了RS422、RS232和RS484三种异步串行通信电平协议。

五、中断系统

边栏推荐
- Leetcode T34: 在排序数组中查找元素的第一个和最后一个位置
- Internet of things technology is widely used to promote intelligent water automation management
- Gateway-88
- MATLAB小技巧(23)矩阵分析--模拟退火
- 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
- To prevent "activation" photos from being muddled through, databao "live detection + face recognition" makes face brushing safer
- 機動目標跟踪——當前統計模型(CS模型)擴展卡爾曼濾波/無迹卡爾曼濾波 matlab實現
- Provincial election + noi part I dynamic planning DP
- [staff] key number (key number identification position | key number marking list | a major key identification principle | F, C, G position marking ascending | F major key identification principle | B
- [force deduction 10 days SQL introduction] Day9 control flow
猜你喜欢

使用 setoolkit 伪造站点窃取用户信息

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
![[getting started] extract non repeating integers](/img/88/3e96df88e980bd98ac112b18a8678c.png)
[getting started] extract non repeating integers

Pipeline detection of UAV Based on gazebo

Embedded-c language-10-enumeration / (function) pointer (function) / multi-level pointer /malloc dynamic allocation / file operation
![[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

Qt的模型与视图

AES简单介绍

Keithley 2100 software 𞓜 Keithley2400 test software ns SourceMeter

OJ输入输出练习
随机推荐
Li Kou 1358 -- number of substrings containing all three characters (double pointer)
shardingSphere
Serial port oscilloscope software ns-scope
SPL-安装与基本使用(二)
长安链同步节点配置与启动
Find the nearest n-th power of 2
2022 Chinese cook (technician) simulation test and Chinese cook (technician) practice test video
Book of quantitative trading - reading notes of the man who conquers the market
Why are some Wills made by husband and wife invalid
Adding color blocks to Seaborn clustermap matrix
OJ输入输出练习
Leetcode T39: 组合总和
2022 ordinary scaffolder (special type of construction work) examination question bank and the latest analysis of ordinary scaffolder (special type of construction work)
Programmer's regimen
Intelligent water conservancy solution
Leetcode t34: find the first and last positions of elements in a sorted array
The data analyst will be ruined without project experience. These 8 project resources will not be taken away
String coordinates of number to excel
Manually dig XSS vulnerabilities
【无标题】