We use the PA port of HT46R23 as the bit port line to output digital bit data, and other spare ports (depending on the convenient PCB layout, any five I / O ports can be used) as the segment drive output. The display unit adopts dynamic scanning display. PA port is used as the output port. Dynamic scanning requires that the scanning frequency should not be too low, otherwise the displayed number will flicker. Generally, if the frequency is not lower than 50Hz, the flicker can not be felt, which is relatively easy to realize in the program. Pb0 (an0) - PB2 (an2) is the analog input of temperature mode signal, humidity analog signal and dangerous gas detection signal. It scans and queries the three analog quantities in different periods, converts the temperature analog signal and humidity analog signal into BCD code after a / D conversion, and displays them on LED in time sharing. The signal output by humidity sensor has large nonlinear error and is sensitive to temperature, At the same time, the humidity sensor needs to be driven by AC. we have designed a special amplification, processing and compensation circuit to process and compensate its signal, so that the analog output is basically linear, and the actual measurement shows that the error can reach 5%. This can meet the requirements for general monitoring. |