Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Sagi-Rastar committed Sep 24, 2024
1 parent fd577ff commit 240b1cb
Show file tree
Hide file tree
Showing 62 changed files with 2,297 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .obsidian/app.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"attachmentFolderPath": "./240905-更新storage以及mqtt模块部分,逐步实现私有json协议",
"attachmentFolderPath": "./秋招进度",
"newLinkFormat": "relative",
"useMarkdownLinks": true
}
14 changes: 13 additions & 1 deletion .obsidian/plugins/surfing/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,19 @@
],
"defaultFilterType": "menu"
},
"treeData": [],
"treeData": [
{
"id": "66aed1913cc61b07",
"parent": 0,
"droppable": true,
"text": "【八股文】嵌入式软件工程师-2025校招必备-详细整理_嵌入式面试八股文-CSDN博客",
"data": {
"fileType": "site",
"fileSize": "",
"icon": {}
}
}
],
"enableHtmlPreview": true,
"supportLivePreviewInlineUrl": false,
"enableTreeView": true
Expand Down
26 changes: 13 additions & 13 deletions .obsidian/workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"state": {
"type": "markdown",
"state": {
"file": "docs/_Embedded/240905-更新storage以及mqtt模块部分,逐步实现私有json协议.md",
"file": "docs/秋招/秋招进度.md",
"mode": "source",
"source": false
}
Expand Down Expand Up @@ -93,7 +93,7 @@
"state": {
"type": "backlink",
"state": {
"file": "docs/_Embedded/240905-更新storage以及mqtt模块部分,逐步实现私有json协议.md",
"file": "docs/秋招/秋招进度.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
Expand All @@ -110,7 +110,7 @@
"state": {
"type": "outgoing-link",
"state": {
"file": "docs/_Embedded/240905-更新storage以及mqtt模块部分,逐步实现私有json协议.md",
"file": "docs/秋招/秋招进度.md",
"linksCollapsed": false,
"unlinkedCollapsed": true
}
Expand All @@ -133,7 +133,7 @@
"state": {
"type": "outline",
"state": {
"file": "docs/_Embedded/240905-更新storage以及mqtt模块部分,逐步实现私有json协议.md"
"file": "docs/秋招/秋招进度.md"
}
}
}
Expand All @@ -156,7 +156,7 @@
"terminal:Open terminal": false
}
},
"active": "b23b674a9c18102d",
"active": "3fb23f5db3f883e4",
"lastOpenFiles": [
"site/css/timeline.css",
"site/search/search_index.json",
Expand All @@ -179,21 +179,22 @@
"site/_Web/240823-HTTPS与OpenSSL/image-20240914101929023.png",
"site/_Web/240823-HTTPS与OpenSSL/image-20240914095732951.png",
"site/_Web/240823-HTTPS与OpenSSL/image-20240914095027965.png",
"().md",
"docs/_Embedded/240905-更新storage以及mqtt模块部分,逐步实现私有json协议.md",
"docs/_CS/240905-C语言语法特性.md",
"docs/_CS/240716-内存管理.md",
"docs/_CS/240829-python操作串口.md",
"docs/秋招/秋招进度.md",
"docs/_CS/240918-C语言八股.md",
"docs/_Embedded/240924-通讯协议总结.md",
"docs/_CS/240716-内存管理.md",
"docs/_CS/240923-C语言自编小模块笔记.md",
"docs/_CS/240905-C语言语法特性.md",
"docs/_Embedded/240905-更新storage以及mqtt模块部分,逐步实现私有json协议.md",
"().md",
"docs/_CS/240829-python操作串口.md",
"docs/_Embedded/240923-STM32 杂项知识点.md",
"docs/_Embedded/index.md",
"docs/_Embedded/ESP32项目汇总.md",
"docs/_Embedded/240603-韦根协议Wiegand.md",
"docs/_Embedded/240820-SolidWorks开螺纹孔.md",
"docs/_Embedded/240818-蓝牙配网以及softAP方式配网探索.md",
"docs/秋招/常见问题起草模板.md",
"docs/秋招/秋招进度.md",
"docs/软件/05-语言/C语言/C语言八股.md",
"docs/硬件/00-基础理论/模电/三极管和MOS管.md",
"docs/硬件/00-基础理论/模电/00-模电总述.md",
Expand All @@ -202,7 +203,6 @@
"docs/硬件/00-基础理论/00-基础理论总述.md",
"未命名 1.md",
"docs/软件/03-WEB技术/240823-HTTPS与OpenSSL.md",
"docs/软件/05-语言/Python/240829-python操作串口.md",
"docs/软件/03-WEB技术/index.md"
"docs/软件/05-语言/Python/240829-python操作串口.md"
]
}
2 changes: 1 addition & 1 deletion docs/_CS/240918-C语言八股.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ typedef struct wiegand_reader
```c
#define INTPTR1 int*
typedef int* INTPTR2;
INTPTR1 P1, P2;s
INTPTR1 P1, P2;
INTPTR2 P3, P4;
```
Expand Down
91 changes: 91 additions & 0 deletions docs/_Embedded/240924-通讯协议总结.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@

# 240924-通讯协议总结

双工与否?

- **全双工**:在同一时刻,两个设备之间可以同时收发数据
- **半双工**:两个设备之间可以收发数据,但不能在同一时刻进行
- **单工**:在任何时刻都只能进行一个方向的通讯

同步与否?

- 有时钟:同步通信
- 无时钟:异步通信
## 1 RS232

![](240924-通讯协议总结/image-20240924122251212.png)

RS232 提高电压后增加了串口通信的传输能力以及抗干扰能力

## 2 RS485

![](240924-通讯协议总结/image-20240924122414369.png)

使用一对差分信号线,支持多个节点,多个主设备

## 3 串口通讯协议

![](240924-通讯协议总结/image-20240924122517157.png)

- 起始位为低电平,停止信号为高电平
- 有效数据为 5~8 位可配置
- 校验位:奇偶检验

波特率为 `总线时钟 / (16 * BRR)`

![](240924-通讯协议总结/image-20240924122916649.png)

## 4 I2C

**物理层:**

![](240924-通讯协议总结/image-20240924123056524.png)

由于 I2C 协议是多个主从设备连接到同一根总线上的,因此不能使用推挽输出,因为如果使用了的话会出现某个 IO 口的 Vee 和 GND 连接到一起,出现短路的情况。

使用开漏输出的话就由于上拉电阻的存在可以避免这一问题的出现,但是需要注意开漏输出的高电平没有驱动能力,需要借助外部上拉输出高电平。

I2C 设备空闲时,输出高阻态,所有设备都空闲则都输出高阻态,由上拉电阻把总线拉为高电平。

**协议层:**

![](240924-通讯协议总结/image-20240924123422225.png)

![](240924-通讯协议总结/image-20240924123426471.png)

![](240924-通讯协议总结/image-20240924123429589.png)

![](240924-通讯协议总结/image-20240924123432536.png)


- 主机在发送起始信号后所有从机都会接收到,根据协议,接下来发送广播的从机地址信号
- 地址位后的读写位高电平读、低电平写
- 从机接收到匹配的地址之后,只有接收到应答信号后主机才能继续发送或接收数据

**当主机写的时候**

- 从机回复应答信号,主机再发送一个字节,数据传输结束后主机给从机发送通知信号

**当主机读的时候**

- 主机若不想接收数据了的话,主机给从机返回一个非应答信号

第三幅图为复合格式,两段起始信号:

- 主机通过第一次传输的起始信号找到从及设备后,再发送一段数据,这段数据一般用于表示从设备内部的寄存器或存储器地址
- 在第二次传输的时候则为实际读写内容

在 SCL 为低电平时,SDA 无效

![](240924-通讯协议总结/image-20240924124205052.png)

## 5 SPI

相比于 I2C 的广播地址选择设备,SPI 多添加了片选线(NSS)低电平有效,高电平为结束信号

在时钟的下降沿进行数据采样。

含有四种通讯模式:

![](240924-通讯协议总结/image-20240924124814230.png)

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
- '2024':
- '2024-09-24':
- newpage:
text: ' [ Embedded ] > 通讯协议总结'
href: /sagi_database/_Embedded/240924-通讯协议总结
- '2024-09-23':
- newpage:
text: ' [ Embedded ] > STM32 杂项知识点'
Expand Down
7 changes: 6 additions & 1 deletion docs/秋招/秋招进度.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ https://careers.cvte.com/zone/login?next=%2Fzone%2Fresume%2Fapplications%3Factiv

- 线上测评 https://tas.talebase.com/api/miuIB3
- 电子设计岗
- 海笔,三天内需要点击参加测评
- 海笔,三天内需要点击参加测评,先是测评了一下性格之类的东西
- 2024 年 9 月 23 日等待笔试通知
- https://wecruit.hotjob.cn/SU6491506a2f9d24316e91b81b/mc/my 个人中心,可以看进度,注意不是跟微信同一个

## usmile | 线上投递、线下宣讲

- 线上投递了

## 邦普公司 | 校招

Expand Down
23 changes: 23 additions & 0 deletions site/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,8 @@








Expand Down Expand Up @@ -915,6 +917,27 @@



<li class="md-nav__item">
<a href="/_Embedded/240924-%E9%80%9A%E8%AE%AF%E5%8D%8F%E8%AE%AE%E6%80%BB%E7%BB%93/" class="md-nav__link">


<span class="md-ellipsis">
240924-通讯协议总结
</span>


</a>
</li>










<li class="md-nav__item">
<a href="/_Embedded/ESP32%E9%A1%B9%E7%9B%AE%E6%B1%87%E6%80%BB/" class="md-nav__link">

Expand Down
23 changes: 23 additions & 0 deletions site/_CS/240716-内存管理/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,8 @@








Expand Down Expand Up @@ -943,6 +945,27 @@



<li class="md-nav__item">
<a href="../../_Embedded/240924-%E9%80%9A%E8%AE%AF%E5%8D%8F%E8%AE%AE%E6%80%BB%E7%BB%93/" class="md-nav__link">


<span class="md-ellipsis">
240924-通讯协议总结
</span>


</a>
</li>










<li class="md-nav__item">
<a href="../../_Embedded/ESP32%E9%A1%B9%E7%9B%AE%E6%B1%87%E6%80%BB/" class="md-nav__link">

Expand Down
23 changes: 23 additions & 0 deletions site/_CS/240829-python操作串口/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,8 @@








Expand Down Expand Up @@ -943,6 +945,27 @@



<li class="md-nav__item">
<a href="../../_Embedded/240924-%E9%80%9A%E8%AE%AF%E5%8D%8F%E8%AE%AE%E6%80%BB%E7%BB%93/" class="md-nav__link">


<span class="md-ellipsis">
240924-通讯协议总结
</span>


</a>
</li>










<li class="md-nav__item">
<a href="../../_Embedded/ESP32%E9%A1%B9%E7%9B%AE%E6%B1%87%E6%80%BB/" class="md-nav__link">

Expand Down
23 changes: 23 additions & 0 deletions site/_CS/240905-C语言语法特性/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,8 @@








Expand Down Expand Up @@ -1024,6 +1026,27 @@



<li class="md-nav__item">
<a href="../../_Embedded/240924-%E9%80%9A%E8%AE%AF%E5%8D%8F%E8%AE%AE%E6%80%BB%E7%BB%93/" class="md-nav__link">


<span class="md-ellipsis">
240924-通讯协议总结
</span>


</a>
</li>










<li class="md-nav__item">
<a href="../../_Embedded/ESP32%E9%A1%B9%E7%9B%AE%E6%B1%87%E6%80%BB/" class="md-nav__link">

Expand Down
Loading

0 comments on commit 240b1cb

Please sign in to comment.