摘要: 继电器 relay delay.h #ifndef _RELAY_H_ #define _RELAY_H_ #include "stm32f10x.h" #include "stdio.h" #include "led.h" /* 管脚宏定义 */ #define RELAY_PORT GPIOA 阅读全文
posted @ 2021-10-18 10:03 halfup 阅读(200) 评论(1) 推荐(0) 编辑
摘要: 先看usart.h #ifndef __USART_H #define __USART_H /* 头文件 */ #include "stm32f10x.h" #include "stdio.h" #include "led.h" #include "beep.h" /* 串口接收信息封装 */ ty 阅读全文
posted @ 2021-10-18 08:54 halfup 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 通信的两种方式: 并行通信 -传输原理:数据各个位同时传输。 -优点:速度快 -缺点:占用引脚资源多 串行通信 -传输原理:数据按位顺序传输。 -优点:占用引脚资源少 -缺点:速度相对较慢 串行通信分类(按照数据传送方向) 单工(a): 数据传输只支持数据在一个方向上传输 半双工(b): 允许数据在 阅读全文
posted @ 2021-10-18 08:41 halfup 阅读(363) 评论(0) 推荐(0) 编辑