基于MSP430F149的溫濕度記錄儀的設(shè)計(jì)說(shuō)明書(shū)
基于MSP430F149的溫濕度記錄儀的設(shè)計(jì)說(shuō)明書(shū),基于,msp430f149,溫濕度,記錄儀,設(shè)計(jì),說(shuō)明書(shū),仿單
外文翻譯
英文原文:
Temperature and humidity measuring instrument
Introduction
Temperature and humidity measurement is a modern newly developed measurement field, especially the humidity measurement is to continue moving forward. Experienced a length method, dry and wet until today the course of the measurement, humidity measurement technology is maturing. Today, we are no longer satisfied with the measurement of the temperature and humidity, especially in some places to monitor directly the requirements of real-time measure and record the temperature and humidity changes in the whole process, and based on these changes identified during storage and transportation security, led to a new temperature and humidity measuring instrument was born. Temperature and humidity measuring instrument is the temperature and humidity parameters were measured according to a predetermined time interval stored in the internal memory, in the completion of the recording function will be coupled to a PC, use the adapter software data stored in accordance with values time analysis instrument. The instrument can determine the storage and transportation process, experiment process without any compromise product safety incident.
MSP430F437 Introduced
The MSP430 MCU main features are as follows:
1) Ultra-low power consumption. MSP430 MCU supply voltage 1.8 to 3.6V low voltage RAM data retention mode power consumption of only 0.1uA active mode power 250uA/MIPS, IO input port leakage current of only 50nA.
2) Powerful processing capability. The MSP430 MCU 16-bit microcontroller, reduced instruction set architecture with the most popular one clock cycle to execute an instruction, the MSP430 instruction speeds of up to 8MHz oscillator is 8MIPS.
3) High-performance analog technology and a wealth of on-chip peripheral modules. The MSP430 monolithic organic combination of TI's high-performance analog technology, each member of the rich on-chip peripherals are integrated. Depending on the model of the different possible combinations of the following modules: watchdog, analog comparator A timer A, timer B, serial 0,1, hardware multiplier, LCD driver, 10/12/14-bit ADC, 12 DAC IIC bus, direct data access, port 1 to 6, the basic timer.
4) The system is stable. Power-on reset, first initiated by the DC0 CPU, to ensure that the program starts executing from the correct position to ensure crystal oscillator start-up and stabilization time. The software can then set the appropriate control bits of the register to determine the final system clock frequency. If the crystal oscillator is used as the CPU clock MCLK failure, the DCO will start automatically, in order to ensure the normal operation of the system. This structure and operational mechanism in the current series microcontroller is unique.
5) Convenient and efficient development environment. MSP430 series OTP type, three types of FLASH-ROM, the domestic large-scale use FLASH. The development of these devices means, after the successful development of the OTP and ROM-type device using a dedicated emulator programmer or chip cover touch. FLASH type is very convenient development and debugging environment, because the device on-chip JTAG debug interface, as well as the electric flash FLASH memory using the first through the JTAG interface to download the program to the FLASH, run by the JTAG interface control program read the on-chip CPU status, and memory contents and other information for designers debug the entire development can be carried out in the same software integrated environment. Which only requires a PC and a JTAG debugger, without the need for a dedicated emulator and programmer.
Temperature And Humidity Sensor
The SHT7x temperature and humidity sensor characteristics are as follows:
1) The temperature and humidity sensor signal is amplified conditioning, A / D converter, all integrated on one IIC bus interface;
2) Given calibration relative humidity and temperature output;
3) IIC bus with industry-standard digital output interface;
4) With dewpoint calculation output function;
5) With excellent long-term stability;
6) Humidity value output resolution of 14 The temperature output resolution of 12 bits, and programmable;
7) Small size (7.65 x 5.08 x 23.5mm) Surface Mount;
8) Having reliable the CRC data transmission checking function;
9) The chip load calibration coefficients can guarantee 100% interchangeability;
AT25256 Introduction
Temperature and humidity data storage chip SPI interface uses ATMEL Corporation's low-voltage serial EEPROM AT25256. AT25256 is mainly applied to low-power occasion the internal accordance with 32K x 8-bit organization, can work at 3.3V, the maximum serial clock frequency as to 2.1MHz. Support for 64-byte page write mode and byte write mode. AT25256 by setting the write-protect pin / WP level to set the chip read-only or writable state. Serial Peripheral Interface (SPI) bus technology is a synchronous serial interface, the hardware features a strong, SPI software is quite simple, so that the CPU has more time to deal with other matters. SPI bus can be connected to multiple host MCU, equipped with SPI interface output devices, output devices, such as LCD drivers, A / D conversion and other peripherals can also be a simple connection to a single TTL shift register chip. The bus allows you to connect multiple devices, but only one device at any moment as the host.
SPI bus clock line is controlled by the host, in addition to data lines: host input / output line from the machine and the host output / slave input line. Host and which slave communication through the slave strobe line selection.
Application SPI system can be simple, complex and can take many forms: (1) a host MCU and the slave MCU; (2) multiple MCU are connected to each other into a multi-host system; (3) a host MCU and slave peripherals.
Segment LCD Display Principle
LCD display principle is to use the physical characteristics of the liquid crystal born, when power is turned on, arranged order so light by; arranged confusion is not energized, to prevent the light to pass through. Light to pass through and not through a combination of an image is displayed on the screen. In layman's terms, the liquid crystal display is the middle of the two glass clip a layer of liquid crystal material, the liquid crystal material to change their light transmission in the signal under the control of the state, so you can see the image in front of the glass panel. LCD ambient light to display information, the LCD itself is not self-luminous, LCD power consumption is very low, more suitable for single-chip low-power applications. In addition, the LCD can only use low-frequency AC voltage drive, the DC voltage will damage the LCD.
????There are many types of LCD segment liquid crystal character LCD, graphical LCD. Segment LCD inexpensive, simple to use, is widely used in a variety of microcomputer application system.
MSP430 LCD driver module has four driving method, respectively, for static drive, 2MUX drive, 3MUX, Drivers, 4MUX drive. Static driving method, in addition to the public badly in need of a pin, each section of the drive each one pin. If the design involves a lot of number of segments, you need to take up the many pin. In order to reduce the pin number, you can select multiple drive needed: 2MUX drive, drive, 3MUX 4MUX driving method. Increase the number of public-pole, can greatly reduce the number of pins. Need to drive more segments, the more obvious effects.
Conclusion
The design requirements to simultaneously detect the temperature and humidity. From the temperature and humidity sensor signal IIC bus to enter MSP430F437 MSP430F437, temperature and humidity data on the one hand to send the LCD display; the other hand, the temperature and humidity data is stored in AT25256 stored temperature and humidity data can be transmitted via RS232 bus to the PC, In the PC application, you can curve shows the temperature and humidity data, and can print the report.
This design uses the MSP430 MCU measurement of temperature and humidity, display, storage, transmission, printing and other functions. But also through the button on the temperature and humidity measurement time interval, whether storage, starting time and other parameters set. In addition, the entire system can be connected to external 9V DC power supply, you can use a 9V lithium battery-powered, low-power design ultra-low power MSP430 MCU, and program design, making the whole system very power, particularly suitable for hand-held meter.
中文翻譯:
溫濕度測(cè)量?jī)x
1 引言
溫濕度測(cè)量是現(xiàn)代測(cè)量新發(fā)展出來(lái)的一個(gè)領(lǐng)域,尤其濕度的測(cè)量更是不斷前進(jìn)。經(jīng)歷了長(zhǎng)度法、干濕法直至今天的電測(cè)量的歷程,使?jié)穸葴y(cè)量技術(shù)日漸成熟。時(shí)至今日,由于我們不再滿(mǎn)足于溫濕度的測(cè)量,尤其是一些場(chǎng)所的監(jiān)控直接要求實(shí)時(shí)測(cè)量并記錄其全過(guò)程溫濕度變化,并依據(jù)這些變化認(rèn)定儲(chǔ)運(yùn)過(guò)程的安全性,導(dǎo)致了新的溫濕度測(cè)量?jī)x的誕生。溫濕度測(cè)量?jī)x是將溫濕度參數(shù)進(jìn)行測(cè)量并按照預(yù)定的時(shí)間間隔將其儲(chǔ)存在內(nèi)部存儲(chǔ)器中,在完成記錄功能后將其聯(lián)接到PC機(jī),利用適配軟件將存儲(chǔ)的數(shù)據(jù)提出并按其數(shù)值、時(shí)間進(jìn)行分析的儀器。利用該儀器可確定儲(chǔ)運(yùn)過(guò)程、實(shí)驗(yàn)過(guò)程等相關(guān)過(guò)程沒(méi)有任何危及產(chǎn)品安全的事件發(fā)生。
2 MSP430F437介紹
MSP430單片機(jī)主要特點(diǎn)如下:
1) 超低功耗。MSP430系列單片機(jī)的電源電壓采用1.8~3.6V低電壓,RAM數(shù)據(jù)保持方式下耗電僅僅0.1uA,活動(dòng)模式耗電250uA/MIPS,IO輸入端口的漏電流最大僅僅50nA。
2) 強(qiáng)大的處理能力。MSP430系列單片機(jī)是16位單片機(jī),采用了目前最流行的精簡(jiǎn)指令集結(jié)構(gòu),一個(gè)時(shí)鐘周期可以執(zhí)行一條指令,使MSP430在8MHz晶振工作時(shí),指令速度可達(dá)8MIPS。
3) 高性能模擬技術(shù)及豐富的片上外圍模塊。MSP430系列單片有機(jī)結(jié)合TI的高性能模擬技術(shù),各成員都集成了較豐富的片內(nèi)外設(shè)。視型號(hào)的不同可能組合有以下功能模塊:看門(mén)狗,模擬比較器A,定時(shí)器A,定時(shí)B,串口0,1,硬件乘法器,液晶驅(qū)動(dòng)器,10位/12/14位ADC,12位DAC,IIC總線,直接數(shù)據(jù)存取,端口1~6,基本定時(shí)器等。
4) 系統(tǒng)工作穩(wěn)定。上電復(fù)位后,首先由DC0啟動(dòng)CPU,以保證程序從正確的位置開(kāi)始執(zhí)行,保證晶體振器有足夠的起振及穩(wěn)定時(shí)間。然后軟件可設(shè)置適當(dāng)?shù)募拇嫫鞯目刂莆粊?lái)確定最后的系統(tǒng)時(shí)鐘頻率。如果晶體振蕩器在用作CPU時(shí)鐘MCLK時(shí)發(fā)生故障,DCO會(huì)自動(dòng)啟動(dòng),以保證系統(tǒng)正常工作。這種結(jié)構(gòu)和運(yùn)行機(jī)制,在目前各系列單片機(jī)中是絕無(wú)僅有的。
5) 方便高效的開(kāi)發(fā)環(huán)境。目前MSP430系列有OTP型、FLASH型和ROM型3種類(lèi)型,國(guó)內(nèi)大量使用的是FLASH型。這些器件的開(kāi)發(fā)手段不同,對(duì)于OTP型和ROM型的器件是使用專(zhuān)用仿真器開(kāi)發(fā)成功之后再燒寫(xiě)或掩摸的芯片。對(duì)于FLASH型則有十分方便的開(kāi)發(fā)調(diào)試環(huán)境,因?yàn)槠骷瑑?nèi)有JTAG調(diào)試接口,還有可電擦寫(xiě)的FLASH存儲(chǔ)器,因此采用先通過(guò)JTAG接口下載程序到FLASH內(nèi),再由JTAG接口控制程序運(yùn)行,讀取片內(nèi)CPU狀態(tài),以及存儲(chǔ)器內(nèi)容等信息供設(shè)計(jì)者調(diào)試,整個(gè)開(kāi)發(fā)都可以在同一個(gè)軟件集成環(huán)境中進(jìn)行。這種方式只需要一臺(tái)PC機(jī)和一個(gè)JTAG調(diào)試器,而不需要專(zhuān)用仿真器和編程器。
3 溫濕度傳感器介紹
SHT7x溫濕度傳感器的主要特性如下:
1) 將溫濕度傳感器、信號(hào)放大調(diào)理、A/D轉(zhuǎn)換、IIC總線接口全部集成于一片;
2) 可給出全校準(zhǔn)相對(duì)濕度及溫度值輸出;
3) 帶有工業(yè)標(biāo)準(zhǔn)的IIC總線數(shù)字輸出接口;
4) 具有露點(diǎn)值計(jì)算輸出功能;
5) 具有卓越的長(zhǎng)期穩(wěn)定性;
6) 濕度值輸出分辨率為14位,溫度值輸出分辨率為12位,并且可編程;
7) 小體積(7.65×5.08×23.5mm),可表面貼裝;
8) 具有可靠的CRC數(shù)據(jù)傳輸校驗(yàn)功能;
9) 片內(nèi)裝載的校準(zhǔn)系數(shù)可保證100%互換性;
4 AT25256介紹
溫度濕度數(shù)據(jù)存儲(chǔ)芯片采用ATMEL公司的SPI接口的低電壓串行EEPROM AT25256。AT25256主要適用于低功耗場(chǎng)合,內(nèi)部按照32K×8位組織,可以工作在3.3V電壓下,最大串行時(shí)鐘頻率為2.1MHz。支持64字節(jié)的頁(yè)寫(xiě)方式以及字節(jié)寫(xiě)方式。另外,AT25256還可以通過(guò)設(shè)置寫(xiě)保護(hù)引腳/WP的電平來(lái)設(shè)置芯片的只讀或可寫(xiě)狀態(tài)。串行外圍設(shè)備接口SPI總線技術(shù)是一種同步串行接口,其硬件功能很強(qiáng),因此,與SPI有關(guān)的軟件相當(dāng)簡(jiǎn)單,使CPU有更多的時(shí)間處理其他事務(wù)。SPI總線上可以連接多個(gè)可作為主機(jī)的MCU、裝有SPI接口的輸出設(shè)備、輸出設(shè)備,如液晶驅(qū)動(dòng)、A/D轉(zhuǎn)換等外設(shè),也可以簡(jiǎn)單連接到單個(gè)TTL移位寄存器芯片。總線上允許連接多個(gè)設(shè)備,但在任一瞬間只允許一個(gè)設(shè)備作為主機(jī)。
其中SPI總線的時(shí)鐘線由主機(jī)控制,另外還有數(shù)據(jù)線:主機(jī)輸入/從機(jī)輸出線和主機(jī)輸出/從機(jī)輸入線。主機(jī)和哪臺(tái)從機(jī)通信通過(guò)各從機(jī)的選通線進(jìn)行選擇。
應(yīng)用SPI的系統(tǒng)可以簡(jiǎn)單,也可以復(fù)雜,主要有多種形式:(1)一臺(tái)主機(jī)MCU和若干從機(jī)MCU;(2)多臺(tái)MCU互相連接成一個(gè)多主機(jī)系統(tǒng);(3)一臺(tái)主機(jī)MCU和若干從機(jī)外圍設(shè)備。
5 段式LCD顯示原理
液晶顯示器的原理是利用液晶的物理特生,通電時(shí)導(dǎo)通,排列變得有秩序,使光線容易通過(guò);不通電時(shí)排列混亂,阻止光線通過(guò)。光線通過(guò)和不通過(guò)的組合就可以在屏幕上顯示出圖象來(lái)。通俗地說(shuō),液晶顯示器就是兩塊玻璃中間夾了一層液晶材料,液晶材料在信號(hào)控制下改變自己的透光狀態(tài),于是就能在玻璃面板前看到圖像了。由于液晶是通過(guò)境光來(lái)顯示信息的,液晶本身不主動(dòng)發(fā)光,所以液晶功耗很低,更加適合于單片機(jī)低功耗應(yīng)用系統(tǒng)。另外,液晶只能使用低頻交流電壓驅(qū)動(dòng),直流電壓將損壞液晶。液晶有很多種類(lèi),常見(jiàn)的有段式液晶、字符式液晶、圖形式液晶等。其中段式液晶價(jià)格低廉,使用簡(jiǎn)單,被廣泛地用于各種單片機(jī)應(yīng)用系統(tǒng)中。
MSP430液晶驅(qū)動(dòng)模塊有4種驅(qū)動(dòng)方法,分別為靜態(tài)驅(qū)動(dòng)、2MUX驅(qū)動(dòng)、3MUX驅(qū)動(dòng)、4MUX驅(qū)動(dòng)。靜態(tài)驅(qū)動(dòng)方法,除了公共極需要一個(gè)引腳,驅(qū)動(dòng)的每一段還各需要一個(gè)引腳。如果設(shè)計(jì)中涉及很多段數(shù),就需要占用眾多引腳。為了減少引腳個(gè)數(shù),可以根據(jù)需要選擇多路驅(qū)動(dòng)方法:2MUX驅(qū)動(dòng)、3MUX驅(qū)動(dòng)、4MUX驅(qū)動(dòng)方法。增加公共極個(gè)數(shù),可以極大地減少引腳數(shù)。需要驅(qū)動(dòng)的段數(shù)越多,效果越明顯。
6 結(jié)語(yǔ)
本設(shè)計(jì)要求能同時(shí)檢測(cè)溫度和濕度。來(lái)自溫濕度傳感器信號(hào)IIC總線進(jìn)入MSP430F437,在MSP430F437中,溫度濕度數(shù)據(jù)一方面送LCD顯示;另一方面將溫度濕度數(shù)據(jù)存儲(chǔ)在AT25256中,存儲(chǔ)下來(lái)的溫度濕度數(shù)據(jù)可以經(jīng)RS232總線傳輸?shù)絇C中,在PC應(yīng)用程序中,可以對(duì)溫度濕度數(shù)據(jù)進(jìn)行曲線顯示,并可以打印報(bào)表。
本設(shè)計(jì)采用MSP430單片機(jī)實(shí)現(xiàn)了對(duì)溫度濕度的測(cè)量、顯示、存儲(chǔ)、傳輸、打印等功能。同時(shí)還可以通過(guò)按鍵對(duì)溫度濕度測(cè)量的時(shí)間間隔、是否存儲(chǔ)、起始時(shí)間等參數(shù)進(jìn)行設(shè)置。此外,整個(gè)系統(tǒng)可以外接9V DC電源供電,可以采用9V鋰電池供電,由于MSP430的超低功耗特性,以及程序設(shè)計(jì)中采用低功耗設(shè)計(jì)方式,使得整個(gè)系統(tǒng)非常省電,特別適合手持式儀表。
收藏