基于MSP430F149的溫濕度記錄儀的設計說明書
基于MSP430F149的溫濕度記錄儀的設計說明書,基于,msp430f149,溫濕度,記錄儀,設計,說明書,仿單
外文翻譯
英文原文:
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.
中文翻譯:
溫濕度測量儀
1 引言
溫濕度測量是現(xiàn)代測量新發(fā)展出來的一個領域,尤其濕度的測量更是不斷前進。經歷了長度法、干濕法直至今天的電測量的歷程,使?jié)穸葴y量技術日漸成熟。時至今日,由于我們不再滿足于溫濕度的測量,尤其是一些場所的監(jiān)控直接要求實時測量并記錄其全過程溫濕度變化,并依據(jù)這些變化認定儲運過程的安全性,導致了新的溫濕度測量儀的誕生。溫濕度測量儀是將溫濕度參數(shù)進行測量并按照預定的時間間隔將其儲存在內部存儲器中,在完成記錄功能后將其聯(lián)接到PC機,利用適配軟件將存儲的數(shù)據(jù)提出并按其數(shù)值、時間進行分析的儀器。利用該儀器可確定儲運過程、實驗過程等相關過程沒有任何危及產品安全的事件發(fā)生。
2 MSP430F437介紹
MSP430單片機主要特點如下:
1) 超低功耗。MSP430系列單片機的電源電壓采用1.8~3.6V低電壓,RAM數(shù)據(jù)保持方式下耗電僅僅0.1uA,活動模式耗電250uA/MIPS,IO輸入端口的漏電流最大僅僅50nA。
2) 強大的處理能力。MSP430系列單片機是16位單片機,采用了目前最流行的精簡指令集結構,一個時鐘周期可以執(zhí)行一條指令,使MSP430在8MHz晶振工作時,指令速度可達8MIPS。
3) 高性能模擬技術及豐富的片上外圍模塊。MSP430系列單片有機結合TI的高性能模擬技術,各成員都集成了較豐富的片內外設。視型號的不同可能組合有以下功能模塊:看門狗,模擬比較器A,定時器A,定時B,串口0,1,硬件乘法器,液晶驅動器,10位/12/14位ADC,12位DAC,IIC總線,直接數(shù)據(jù)存取,端口1~6,基本定時器等。
4) 系統(tǒng)工作穩(wěn)定。上電復位后,首先由DC0啟動CPU,以保證程序從正確的位置開始執(zhí)行,保證晶體振器有足夠的起振及穩(wěn)定時間。然后軟件可設置適當?shù)募拇嫫鞯目刂莆粊泶_定最后的系統(tǒng)時鐘頻率。如果晶體振蕩器在用作CPU時鐘MCLK時發(fā)生故障,DCO會自動啟動,以保證系統(tǒng)正常工作。這種結構和運行機制,在目前各系列單片機中是絕無僅有的。
5) 方便高效的開發(fā)環(huán)境。目前MSP430系列有OTP型、FLASH型和ROM型3種類型,國內大量使用的是FLASH型。這些器件的開發(fā)手段不同,對于OTP型和ROM型的器件是使用專用仿真器開發(fā)成功之后再燒寫或掩摸的芯片。對于FLASH型則有十分方便的開發(fā)調試環(huán)境,因為器件片內有JTAG調試接口,還有可電擦寫的FLASH存儲器,因此采用先通過JTAG接口下載程序到FLASH內,再由JTAG接口控制程序運行,讀取片內CPU狀態(tài),以及存儲器內容等信息供設計者調試,整個開發(fā)都可以在同一個軟件集成環(huán)境中進行。這種方式只需要一臺PC機和一個JTAG調試器,而不需要專用仿真器和編程器。
3 溫濕度傳感器介紹
SHT7x溫濕度傳感器的主要特性如下:
1) 將溫濕度傳感器、信號放大調理、A/D轉換、IIC總線接口全部集成于一片;
2) 可給出全校準相對濕度及溫度值輸出;
3) 帶有工業(yè)標準的IIC總線數(shù)字輸出接口;
4) 具有露點值計算輸出功能;
5) 具有卓越的長期穩(wěn)定性;
6) 濕度值輸出分辨率為14位,溫度值輸出分辨率為12位,并且可編程;
7) 小體積(7.65×5.08×23.5mm),可表面貼裝;
8) 具有可靠的CRC數(shù)據(jù)傳輸校驗功能;
9) 片內裝載的校準系數(shù)可保證100%互換性;
4 AT25256介紹
溫度濕度數(shù)據(jù)存儲芯片采用ATMEL公司的SPI接口的低電壓串行EEPROM AT25256。AT25256主要適用于低功耗場合,內部按照32K×8位組織,可以工作在3.3V電壓下,最大串行時鐘頻率為2.1MHz。支持64字節(jié)的頁寫方式以及字節(jié)寫方式。另外,AT25256還可以通過設置寫保護引腳/WP的電平來設置芯片的只讀或可寫狀態(tài)。串行外圍設備接口SPI總線技術是一種同步串行接口,其硬件功能很強,因此,與SPI有關的軟件相當簡單,使CPU有更多的時間處理其他事務。SPI總線上可以連接多個可作為主機的MCU、裝有SPI接口的輸出設備、輸出設備,如液晶驅動、A/D轉換等外設,也可以簡單連接到單個TTL移位寄存器芯片??偩€上允許連接多個設備,但在任一瞬間只允許一個設備作為主機。
其中SPI總線的時鐘線由主機控制,另外還有數(shù)據(jù)線:主機輸入/從機輸出線和主機輸出/從機輸入線。主機和哪臺從機通信通過各從機的選通線進行選擇。
應用SPI的系統(tǒng)可以簡單,也可以復雜,主要有多種形式:(1)一臺主機MCU和若干從機MCU;(2)多臺MCU互相連接成一個多主機系統(tǒng);(3)一臺主機MCU和若干從機外圍設備。
5 段式LCD顯示原理
液晶顯示器的原理是利用液晶的物理特生,通電時導通,排列變得有秩序,使光線容易通過;不通電時排列混亂,阻止光線通過。光線通過和不通過的組合就可以在屏幕上顯示出圖象來。通俗地說,液晶顯示器就是兩塊玻璃中間夾了一層液晶材料,液晶材料在信號控制下改變自己的透光狀態(tài),于是就能在玻璃面板前看到圖像了。由于液晶是通過境光來顯示信息的,液晶本身不主動發(fā)光,所以液晶功耗很低,更加適合于單片機低功耗應用系統(tǒng)。另外,液晶只能使用低頻交流電壓驅動,直流電壓將損壞液晶。液晶有很多種類,常見的有段式液晶、字符式液晶、圖形式液晶等。其中段式液晶價格低廉,使用簡單,被廣泛地用于各種單片機應用系統(tǒng)中。
MSP430液晶驅動模塊有4種驅動方法,分別為靜態(tài)驅動、2MUX驅動、3MUX驅動、4MUX驅動。靜態(tài)驅動方法,除了公共極需要一個引腳,驅動的每一段還各需要一個引腳。如果設計中涉及很多段數(shù),就需要占用眾多引腳。為了減少引腳個數(shù),可以根據(jù)需要選擇多路驅動方法:2MUX驅動、3MUX驅動、4MUX驅動方法。增加公共極個數(shù),可以極大地減少引腳數(shù)。需要驅動的段數(shù)越多,效果越明顯。
6 結語
本設計要求能同時檢測溫度和濕度。來自溫濕度傳感器信號IIC總線進入MSP430F437,在MSP430F437中,溫度濕度數(shù)據(jù)一方面送LCD顯示;另一方面將溫度濕度數(shù)據(jù)存儲在AT25256中,存儲下來的溫度濕度數(shù)據(jù)可以經RS232總線傳輸?shù)絇C中,在PC應用程序中,可以對溫度濕度數(shù)據(jù)進行曲線顯示,并可以打印報表。
本設計采用MSP430單片機實現(xiàn)了對溫度濕度的測量、顯示、存儲、傳輸、打印等功能。同時還可以通過按鍵對溫度濕度測量的時間間隔、是否存儲、起始時間等參數(shù)進行設置。此外,整個系統(tǒng)可以外接9V DC電源供電,可以采用9V鋰電池供電,由于MSP430的超低功耗特性,以及程序設計中采用低功耗設計方式,使得整個系統(tǒng)非常省電,特別適合手持式儀表。
收藏