Current location - Education and Training Encyclopedia - Graduation thesis - Try to measure the speed with atmega 16! ! ! Hurry up! ! !
Try to measure the speed with atmega 16! ! ! Hurry up! ! !
introduce

Temperature measurement is essential for people's daily life, industrial production and experimental research, and real-time accurate and high-precision temperature measurement is very important for human production and life activities. Most of the traditional temperature measurement methods use alcohol or mercury thermometers, which are inconvenient to carry, fragile, low in measurement accuracy and easy to be disturbed by human factors. Especially in coal mine temperature measurement, the fragility of traditional thermometer is particularly prominent, so it is necessary to design a high-precision portable temperature monitoring system by using modern electronic technology.

In order to solve the problem of temperature measurement in harsh environment such as underground, a solution with low power consumption, simple structure and convenient use is designed. In this scheme, the single-wire intelligent digital temperature sensor DS 18B20 is selected. Shows the interface circuit of DS 18B20.

2.3 clock module

The clock module adopts the trickle charging clock chip DS 1302 introduced by DALLAS Company of the United States. The chip contains a real-time clock/calendar and 3 1 byte static RAM, which provides information such as minutes, days, months, years and weeks, as well as automatic adjustment function in leap years and format switching function of 24/ 12 hours [6]. By controlling the register of DS 1302, the function design of the clock module can be completed conveniently. As shown in DS 1302 interface circuit.

2.4 LCD module

The display module adopts 128×64 dot matrix Chinese character graphic liquid crystal display module, which can display Chinese characters and graphics, provide 8 pairs of parallel and serial external interface modes, and have cursor display, screen switching, sleep mode and so on. Shows the interface circuit of LCD 12864.

3 system software design

The system development software adopts Winavr, and the development language is C language. The system adopts modular programming idea, cuts the program into several modules, programs and debugs each module separately, and finally gathers them together for general debugging. The programming part mainly includes the bottom layer and application program of DS 18B20, the bottom layer and application program of DS 1302, and the main program part of the system. As shown in the main program flow chart.

4 conclusion

In this paper, a clock temperature measurement system based on ATmega 16 is designed, and the software and hardware are designed and debugged. Compared with the traditional temperature measurement method, it has the characteristics of simple operation, high precision and less interference. The measurement system designed in this paper can be used in underground mines, grain depots, workshops and other occasions, and has a good application prospect.