-
It can be determined that the microcontroller has vibrated up.
I don't know how you connected the P0 port, if it is a bus mode, P0 has no pull-up resistance, and the output is zero when measured with a multimeter.
However, if the negative pole of the digital tube is connected to the P0 port through a resistor of several hundred to several K, and the positive terminal is connected to the power supply, the digital tube should be able to light up when the output of P0 is zero.
-
Ultrasonic rangefinder?? I've done it successfully. Do you want it?
P0 port? Didn't you add a resistor??? 10k pull-up resistor!!
-
You can see if ALE has an output, and if you don't know if your circuit is connected correctly, you find a pin that is not connected, control its output, and then use a multimeter to measure and see if it ......In addition, the P0 port has no pull-up resistor, and the drain is open, so you can try to connect a pull-up resistor.
-
You can add bus drivers such as 373, etc., so that the driving ability of the bus signal is stronger, and I don't know which series of single-chip microcomputer you use, I use AT89S52, a piece of six or so, and it is not very expensive.
-
Hey, my senior didn't make the graduation project, and the sadder picture was based on the picture in the book, and I know that the teacher didn't solve it.
-
It is recommended to take a closer look at your program, is it **accidentally given p0 to clear, hehe, although the possibility is not very large, but it doesn't hurt to see, right?
-
The P2 port can choose a digital tube, which means that it vibrates, I think you didn't add a pull resistor to the P0 port, I also made such a mistake at the beginning!
-
1. The power supply voltage is too high, generally speaking, it will not burn out if it is slightly higher than 5V.
2. The power supply is reversed. This situation often occurs when doing experiments on a universal board or breadboard, so be sure to check whether the polarity of the power supply is reversed before connecting to the power supply.
3. A brother said that the current is too large, but in fact, it is because it is reversed or connected to too high a voltage that will cause the current to be too large. If it is connected correctly, there will be no excessive current. For example, if the single-chip microcomputer is connected to a 5V800mA DC power supply and a 5V20A DC power supply, as long as you connect it correctly, the single-chip microcomputer can work normally, and the 5V20A power supply will not burn out the single-chip microcomputer.
4. When the load is loaded, if the working current of the load is large, there must be a corresponding driving circuit, and it cannot be directly connected to the single-chip microcomputer.
5. The last possibility is static electricity, which cannot be ignored. Static electricity is easy to generate in a dry environment, especially in the winter in the north, one is the dry weather, and the other is that the clothes worn are mostly wool, so the body will produce static electricity. However, now many microcontrollers have improved their antistatic capabilities.
-
Fainted, I was just about to go to bed, and you asked another question, hehe.
That's what it looks like, I happened to have done industrial control before, and I happened to have solved this problem before.
This is not a problem with the program, it is a problem with the circuit, if my guess is correct, on your single-chip microcomputer control board, the filter capacitance of the power supply part must exceed 1000uh, and it is all electrolytic capacitors.
There are two ways to solve this:
1 Reduce the filter capacitance of the power supply, the filter capacitance is not the bigger the better, but the right one, generally speaking, the total capacity is about 330---470uf
Left and right are fine, too big will make the power-up speed slower, so that the CMOS level will appear unknown level for a longer time. We were.
The electric control board that came to me allowed me to remove an electrolytic capacitor and replace an electrolytic capacitor, with a total capacity of about 330uf, which is not too much of a problem.
Yes, that's not too much, I mean the relay doesn't jump anymore, but the indicator light will flash a little.
Also, if allowed, the filter capacitor uses a few tantalum capacitors, and our electronic control board is 12V, so the total filter capacitor is.
One 220uf 25V electrolytic capacitor, one 100UF 25V electrolytic capacitor, one 22UF 25V tantalum capacitor, remember, power filter capacitor capacity.
It does not need to be too large, it is best to have multiple capacitors in parallel, and the capacitance and packaging of multiple capacitors are completely different, and it is better to use one tantalum capacitor.
Of course, if the voltage is too high, there will be less choice.
2 At the place where the 595 UL2003 are connected, close to the pins of UL2003, place a 1UF 50V common ceramic capacitor on each pin.
In this way, as soon as it is powered on, the input terminal of UL2003 remains at an instantaneous low level, so the output terminal is high, and the relay cannot move.
step, my electronic control board has completely eliminated the problem of power-on beating, and even the indicated LED does not flash.
The serial port of 51 machine is below the low level, the high level is below 5V, the serial port of the PC is low level -12V, the high level is +12V, and the serial port communication between the 51 machine and the PC machine should add the level conversion IC >>>More
You use a P1 port to control the dynamic scanning of 8 digital tubes, and the dynamic scanning display of digital tubes needs to be blanked. >>>More
Step 1: ANL is Logic and Operation.
That is to say, the first step is to perform and calculate the content in A and 47h in 34h. a=10000011 34h=00110100 >>>More
Only R0 and R1 can store data and addresses, @r7 indirect addresses are invalid; movx a,r0 error: incoming external data, must be indirectly addressed movx a,@r0; Movx B, @dptr Error: Only accumulator A can receive data from external data storage, B cannot; movc a, @r0 wrong: >>>More
The working principle of the watchdog: after the system runs, the watchdog counter is started, and the watchdog begins to count automatically, if the watchdog is not cleared at a certain time, then the watchdog counter will overflow and cause the watchdog to be interrupted, causing the system to reset. The role of the watchdog is to prevent the program from looping, or running away. >>>More