LM324 can also be used as a comparator like LM393 in the open-loop state, but if the outputs of two LM393 comparators can be directly connected to make a line output, but LM324 can't make a line, it should be used as a comparator.
LM324 is a chip with four operational amplifiers integrated inside, not something integrated inside STC microcontroller. The principle and function of operational amplifier cannot be described here. It is suggested that the landlord read two chapters about operational amplifiers in the textbook of Electronic Technology. For example, according to different connection modes, the functions of the operational amplifier include voltage comparator, addition operation, subtraction operation, proportional operation, differential operation, integral operation and open-loop comparator. ...