当前位置>主页 > 期刊在线 > 电子工程 >

电子工程23年1期

基于 FatFs 的数显游标卡尺数据记录仪
常国权
(安阳工学院 计算机科学与信息工程学院,河南 安阳 455000)

摘  要:为了实现对数显游标卡尺测量数据的快速、准确记录,设计了一种基于 FatFs 文件系统的数显游标卡尺数据记录仪。该记录仪以 STC8 单片机为核心,扩展了 TF 卡存储模块、实时时钟模块等,支持连续记录和外部按键触发记录两种模式。可以把数显游标卡尺串行通信接口输出的测量数据以 CSV 文本文件的格式存储在 TF 卡中,并对每条测量数据自动添加编号和时间戳,方便对数据进行分析和处理。


关键词:FatFs 文件系统;游标卡尺;STC8 单片机;SPI



DOI:10.19850/j.cnki.2096-4706.2023.01.014


基金项目:2021 年度安阳市科技计划项目(2021C01SF030)


中图分类号:TP368.2                                      文献标识码:A                                文章编号:2096-4706(2023)01-0054-04


Digital Vernier Caliper Data Logger Based on FatFs

CHANG Guoquan

(Department of Computer Science and Information Engineering, Anyang Institute of Technology, Anyang 455000, China)

Abstract: In order to realize the fast and accurate recording of the measurement data of digital vernier caliper, a vernier caliper data logger based on FatFs file system is designed. The data logger takes STC8 Single-Chip Microcontroller as the core, expands the TF card storage module and real-time clock module and so on. It supports two modes of continuous recording and external key triggered recording. It can store the measurement data output by the serial communication interface of the digital vernier caliper into the TF card with the format of CSV text file, and automatically add the number and time stamp to each measurement data. It is convenient for data analysis and processing.

Keywords: FatFs file system; vernier caliper; STC8 Single-Chip Microcontroller; SPI 


参考文献:

[1] 赵景波,张伟 .Protel 99 SE 实用教程:第 3 版 [M]. 北京:人民邮电出版社,2017.

[2] FatFs-Generic FAT Filesystem Module [EB/OL].http://elmchan.org/fsw/ff/00index_e.html. 

[3] 深圳国芯人工智能有限公司 .STC8A/8F 系列单片机技术参考手册 [EB/OL].http://www.stcmcudata.com/STC8FDATASHEET/STC8A-STC8F.pdf. 

[4] 严蔚敏,李冬梅,吴伟民.数据结构(C语言版):第2版 [M].北京:人民邮电出版社,2015.

[5] 徐爱钧 . 单片机原理与应用——基于 C51 及 Proteus 仿真[M]. 北京:清华大学出版社,2015.


作者简介:常国权(1973.11—),男,汉族,河南清丰人,副教授,硕士,研究方向:嵌入式技术应用与开发。