uart_temp/ReadMe.md
2023-12-29 11:24:42 +08:00

44 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# UART_TEMP - 利用单片机获取温度,并通过串口打印、
uart_temp是用于8051单片机上的一个项目用于获取温度并使用串口打印出来。
## 特点
- 支持打印浮点数
- 支持串口打印
- 仅当温度变化时才会打印
- 支持[SDCC](https://sdcc.sourceforge.net/)编译
- 支持[stcgal](https://github.com/grigorig/stcgal)命令行烧录
- 支持Makefile
- 支持Window环境
## 快速开始
请先安装以下工具:
- [SDCC - Small Device C Compiler (sourceforge.net)](https://sdcc.sourceforge.net/)
- [grigorig/stcgal: Open Source STC MCU ISP flash tool (github.com)](https://github.com/grigorig/stcgal)
- [Make - GNU Project - Free Software Foundation](https://www.gnu.org/software/make/)
- [串口调试助手软件(ATK-XCOM) 版本v3.0 — 正点原子资料下载中心 1.0.0 文档](http://47.111.11.73/docs/tool/ruanjian/ATK-XCOM.html)
1. 编译源文件
```bash
make clean all
```
2. 将Makefile中的COM3口修改为本地连接单片机的COM口
3. 烧录到单片机
```bash
make flash
```
4. 打开串口软件,接收来自单片机的数据
## 更多的信息
[从Keil迁移到SDCC](https://blog.csdn.net/weixin_44681954/article/details/135286404)