-
Crash, it may be that the on-site interference is too severe. Anyway, even have abandoned chips that don't have internal program memory and EEPROM. The reason is that it is often not a program problem, but a board and PCB design problem.
Occasionally, I once encountered a board that was not welded at all, and there was a signal on it, and then I found that the signal turned out to be a radio station signal, dizzy, carefully checked, by, the ground loop.
Since then, I think that the chip still uses a high degree of integration, so that the fewer external wiring the better. In particular, if the bus can not be externally connected, it will not be externally connected, so as not to cause trouble.
If you are a person who has raw rice and ripe rice, you should change the procedure. It is estimated that you are using a 51 machine, and write every 200b address in the program memory space that you don't use"ljmp 0000h"In addition, the interrupt entrance that is not used is also written, because the 51 crash is likely to be the program pointer pointing to the program memory space that is not used in the first place, and those spaces that are not used are by default"ff", you go and look up the compilation table to know if 51 is executed"ff"What are you doing? Anyway, it's not going to go back to the normal routine.
-
Haven't you programmed a microcontroller before? Draw a flowchart first, and the logical relationship should be clear.
The first is the pump, as long as there is a low limit of the water tower, the pump will be started until the high limit of this water tower. At the same time, which water tower is low, open this water tower solenoid valve until it is high.
Therefore, three registers are needed to record the status of the three water towers, whether they need to draw water or not, when the water level of a certain water tower is low, the register is 1, and when the water tower is high, the register is cleared.
Then do the three registers and do the arithmetic, if the result is 1 then turn on the pump, if it is 0 then stop.
-
Three signals should be taken, which is 1, which solenoid valve is on.
-
A microcontroller is actually a simple microprocessor. It is usually said that to learn the single-chip microcomputer well, it is necessary to be proficient in its use, that is, how to use the single-chip microcomputer to simulate and realize an actual function. Then if you want to learn well, you have to have a deep understanding and understanding of the working principle of the microcontroller, because it is a microprocessor (you can understand it as a CPU), so it is recommended that you read some books about the operating system.
There is usually a detailed explanation of the working principle of the CPU.
It is also necessary to be proficient in the methods (or tools) to use it - assembly language or C language.
If you want to learn assembly well, you must first change the thinking mode of C and Basic languages that you have learned before, and assembly is a relatively low-level language. His thinking mode is the "symbolic representation" of the computer's operating mechanism, so in the final analysis, it is necessary to master the working principle of the single-chip microcomputer, and then use the assembly to draw a scoop to depict it. Some of the more cumbersome operations can make use of some existing **.
It's very annoying to learn a single-chip microcomputer just to get started, and it will be better in the future, because its thinking mode is simple, but it is just more expressed. Just stick to it.
-
Look at Guo Tianxiang's video, watch more, you can learn, it's as simple as that.
-
First, buy a small single-chip microcomputer to learn and develop a board, and then learn and practice according to Guo Tianxiang's video, you will feel that learning a single-chip microcomputer is no longer boring!!
Don't worry, Lord, I don't know how to move! If you don't know how to pretend to understand, you won't come! I just want to reassure you that it will be good, OPPO national warranty! >>>More
If you go shopping for a long time, you will feel tired, it is physical overrun, and the physical feeling will be adjusted after a night's rest; If you are too busy at work, and feel tired because of the amount of work, it is a double overrun of physical and mental strength, give yourself some time to recuperate with peace of mind, and the pressure will be reduced, so you will not feel too tired; Life is tedious, there are too many things, emotional, money, at this time I feel tired, it is psychological, it is more difficult to deal with, life is spent in a busy and busy way, tired may also be the driving force that pushes us forward, in order to spend the next second easily, this second is working hard... When you are tired, it is inevitable to go out with your family, talk to friends, and post a random post on the Internet, and it is important to learn to regulate yourself.
Know eminem? First of all, listen to his songs, relax and learn to be ruthless. >>>More