当前位置:网站首页>Design of DS18B20 digital thermometer system

Design of DS18B20 digital thermometer system

2022-07-06 16:53:00 Society, you Lei brother, life is hard, don't bend down

STC89C52 Single chip microcomputer

STC89C52 Introduction to MCU interface
This single chip computer has 40 One pin .
①P0 mouth (P0.0~P0.7) 8 Bit drain switch type bidirectional switch I/O port . It can be used as a general purpose I/O Mouth use , But the pull resistance must be added .

②P1 mouth (P1.0~P1.7) With pull-up resistor inside 8 Position accurate two-way I/O port .

③P2 mouth (P2.0~P2.7) With pull-up resistor inside 8 Position accurate two-way I/O port .

④P3 mouth (P3.0~P3.7) With pull-up resistor inside 8 Bit multifunctional bidirectional I/O port , With external interrupt .

51 SCM interrupt trigger mode introduction

There are two ways to trigger interrupts , They are level trigger and edge trigger . Level trigger is to check the interrupt source line in each machine cycle , Detection of low level will be set as the flag of interrupt request . Edge trigger is when the MCU detects the high level of the interrupt source line in the last machine cycle , Low level detected in the next machine cycle , Will set the flag of the interrupt request , Request interrupt .

74HC245 Chip usage

The chip is in DS18B20 The function of digital thermometer system is to increase the driving ability , Increased the brightness of the nixie tube . In addition, this chip can protect the master chip , It also has the function of two-way asynchronous communication , It has 20 One pin , In the system, the chip A End 8 Pins and MCU P0.0-P0.7 Connected to a , The first pin of this chip DIR position 1 Hour high level from A End input B End output , by 0 The low level can be changed from B End input A End output . It also has a special pin OE Pin , That is, enable port , by 1 when A/B End is not conductive , by 0 Time conduction , In fact, it acts as a switch .

74HC138N chip

38 The decoder will 3 position 2 The hexadecimal number is converted into eight outputs in different states through the circuit
① When a strobe G1 High level , The other two strobes (G2) and (G3)) Low power level , The address end can be (A0、A1、A2) The binary code of is in Y0 to Y7 Corresponding output The terminal translates at a low level . such as : A2A1A0=1 10 when , be Y6 The output terminal outputs a low-level signal .
principle : There are three strobe ends , Only the selected through end is 100 when 138 Just work , Each binary number corresponds to a low-level output , such as 000 Corresponding y1( Not ), Other outputs are high , Only one is low level .

原网站

版权声明
本文为[Society, you Lei brother, life is hard, don't bend down]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060920411392.html