SD卡存储采集数据电路设计-毕业论文_图文

导读:1.1设计相关指标分析及系统构成........................,1.2主控电路芯片的选择............................,2.1SD存储卡系统概念............................,3硬件设计...................................,4软件设计.............................

SD卡存储采集数据电路设计-毕业论文_图文

Abstract

Many industry site need data collector of all kinds of data acquisition work completed. Practical application request data collector reliable, low cost, easy to operate, easy to data collection and analysis; Both convenient and PC online, and independently complete the data acquisition, storage work.

In recent years, with SD card storage capacity greatly raised, the lower prices, its application scope is more and more widely. When the data acquisition system needs a long time to catch and records of large quantities of data, choose SD card as a storage medium, is a very good choice. For example in the electrical energy monitoring and reactive compensation system, a record a lot of voltage, current, active power, reactive power and parameters such as time, when the SCM acquisition to these data can use SD as storage medium.

This paper introduces the SD card store data acquisition circuit design principle, circuit and program, this paper expounds the main control based on STC12C5A60S2 chip DY_mini80E development board realize data acquisition and data storage SD circuit design process and the realization methods and operation result analysis. The system can also collecting four ways of periodic signal waveform, and will be four road simulation voltage (0-5 V) for A/D conversion, every second conversion once, result into ASCII form, and four road respectively to the storage SD card established beforehand good CH1. TXT, CH2. TXT, CH3. TXT, CH4. TXT documents. The design of the main control chip in STC12C5A60S2 DY_mini80E development board, using the developed on board A/D conversion module PCF8591, external SD interface module, completed the debugging realized.

Keyword: Data collection;STC12C5A60S2; PCF8591; SD card; REG1117-3.3; FAT32 file system

目 录

引言 .......................................................... 2

1 方案论证与选择 .............................................. 3

1.1 设计相关指标分析及系统构成 ...................................................... 3

1.2 主控电路芯片的选择 .............................................................. 3

2 SD卡简介 ................................................... 4

2.1 SD存储卡系统概念 ................................................................ 4

2.1.1总线拓扑 ....................................................................... 4

2.1.2总线协定 ....................................................................... 6

2.2 SD卡的引脚定义及SD卡的命令 ..................................................... 7

2.2.1 SD卡的引脚定义 ................................................................ 7

2.2.2 SD卡的命令 .................................................................... 8

3 硬件设计 .................................................. 10

3.1 电源模块 ....................................................................... 10

3.2 单片机最小系统 ................................................................. 11

3.2.1 STC12C5A60S2原理图以及它的特性 ............................................. 11

3.2.2 单片机STC12C5A60S2最小系统的组成 .......................................... 13

3.3 带SD卡的TFT彩屏 .............................................................. 15

4 软件设计 .................................................. 19

4.1 软件设计目标 ................................................................... 19

4.2 设计环境 ....................................................................... 19

4.3 系统软件设计 ................................................................... 19

4.3.1 系统初始化 .................................................................... 19

4.3.2 SD卡初始化 ................................................................... 20

4.3.3 数据块的读写 .................................................................. 21

4.3.4 SD卡存储时间和电压流程图 ..................................................... 24

4.3.5 定时器T0函数流程图 .......................................................... 25

4.3.6 主体程序流程图 ................................................................ 26

5 结论 ...................................................... 28

谢 辞 ..................................................... 29

参考文献 ..................................................... 30

附 录 ..................................................... 31

引言

随着近年来SD卡储存容量不断大幅度提高,价格不断降低,其应用范围越来越广泛。当数据采集系统需要较长的时间来捕捉和记录大量数据时,选择SD卡作为存储介质,是一个非常好的选择。就如在电能监测系统中,要连续记录大量的电压、电流及时间等参数,当采集到这些数据时就可以利用SD作为存储媒质。

SD卡是由日本松下、东芝及美国SanDisk公司于1999年8月共同开发研制。大小不足一张邮票的SD一记忆卡,重量不足2克,但却拥有高记忆容量、快速数据传输率、极大的移动灵活性以及很好的安全性。SD卡在24mm×32mm×2.1mm的体积内结合了SanDisk快闪一记忆卡控制与MLC技术和Toshiba(东芝)0.6u及0.13 u的NAND技术,通过9针的接口界而与专门的驱动器相连接,不需要额外的电源来保持其上记忆的信息。而且它是一体化固体介质,没有任何移动部分。SD卡的技术建立是基于MultiMwdia卡(MMc)格式上发展而来,大小和MMC差不多。长宽和MMC一样,只是比MMC厚了0.7mm,以容纳更大容量的存贮单元。SD卡与MMC卡保持着向上兼容,也就是说,MMC可以被新的SD设备存取,兼容性则取决于应用软件,但SD卡却不可以被MMC设备存取。

采用SD卡存储技术设计一款低成本数据采集模块。该数据采集模块可与PC机共同实现数据采集与分析,也可长时间独立工作于工业现场,并将采集数据存放于大容量SD卡,便于数据收集并利用计算机分析。该数据采集模块,结构简单,工作稳定,体积小,成本低。

单片机是智能化模块,有数据存储、读写的功能,并且支持汇编和C语言编程,在工作电压稳定的条件下可以实现长时间稳定的工作,而且还具有价格低廉的优势。在读写SD卡中,单片机比PC机更适合在现场长时间工作。而STC12C5A60S2系列单片机价格便宜、性能稳定。基于此特点,设计采用PCF8591进行A/D转换,用STC12C5A60S2单片机对SD卡进行读写操作。

五星文库wxphp.com包含总结汇报、党团工作、人文社科、IT计算机、文档下载、外语学习、行业论文、教学研究、工作范文、考试资料以及SD卡存储采集数据电路设计-毕业论文_图文等内容。

本文共12页12345>>12