-
The guy above is talking nonsense. The so-called microcontroller is a single-chip computer that integrates microprocessors, memories and input-output interfaces and other components on a chip. The main functions and applications of single-chip microcomputer are control, such as the control circuit of microwave oven, the control circuit of air conditioning, etc., of course, mobile phones or PDA will also use single-chip microcomputer, but it cannot be said that mobile phone GBA, PDA is single-chip microcomputer!
For more professional answers, please contact STMicroelectronics for product service: ST's microcontroller portfolio includes the industry's broadest and most innovative 32-bit product family, the STM32, covering ultra-low-power and ultra-high-performance directions. At present, it offers 16 product lines (F0, G0, F1, F2, F3, G4, F4, F7, H7, MP1, L0, L1, L4, L4+, L5, WB) with more than 1000 models. Thank you!
-
Crystal oscillator, without it the microcontroller can not work.
To put it simply, the human heart is beating all the time, and once the heart stops beating, the person will die, but the place where we process data is the brain. Therefore, the crystal oscillator is the heart of the single-chip microcomputer, and the single-chip microcomputer itself is the brain.
It can also be said: without crystal oscillator, there is no clock cycle, without clock cycle, the program cannot be executed**, and the single-chip microcomputer cannot work.
To elaborate:
When the microcontroller works, it takes instructions from the ROM one by one, and then executes them step by step. The time that a microcontroller accesses a memory is called a machine cycle, which is a time benchmark. — Machine cycles include 12 clock cycles.
If a microcontroller chooses a 12MHz crystal oscillator, its clock cycle is 1 12us, and one of its machine cycles is 12 (1 12)us, which is 1us.
Among all the instructions of MCS-51 microcontroller, some of them are completed relatively quickly, as long as one machine cycle is enough, some are relatively completed, and they need 2 machine cycles, and there are two instructions that require 4 machine cycles. In order to measure the length of time an instruction is executed, a new concept is introduced: the instruction period.
The so-called instruction period refers to the time it takes to execute an instruction. For example, when it is necessary to calculate the time required for the DJNZ instruction to be completed, it is necessary to know the frequency of the crystal oscillator, if the crystal oscillator used is 12MHz, then a machine cycle is 1us. The DJNZ instruction is a two-cycle instruction, so it takes 2us to execute it once.
If the command needs to be executed 500 times, exactly 1000us, that is, 1ms.
The machine cycle is not only important for command execution, but also the time benchmark for microcontroller timers and counters. For example, if a single-chip microcomputer chooses a 12MHz crystal oscillator, then when the value of the timer is added to 1, the actual elapsed time is 1us, which is the timing principle of the single-chip microcomputer.
-
That's the crystal oscillator, without this, the microcontroller doesn't work.
The crystal oscillator determines the machine cycle and baud rate, which is the basis of the timing. Equivalent to the human heart.
-
Crystal oscillator, a must, this is the smallest system of single-chip microcomputer is indispensable, without it, single-chip microcomputer can do nothing.
-
This is a quartz crystal, which is used to provide a clock signal to the chip, and the frequency of the quartz crystal is written on it.
-
Hello, dear I am happy to answer for you, the principle of single-chip microcomputer is as follows: single-chip microcomputer is the ** processing unit (CPU), memory, input and output integrated on a chip, it can be said that single-chip microcomputer is a microcomputer, but compared with the computer we usually use, its function is different, and it is not as powerful as the computer we use. The computer can run one application after another, and the microcontroller can write executable files according to the engineer to achieve a variety of functions.
So, how does the single-chip microcomputer know what instructions to execute, what actions to do, and how are our instructions recognized by the single-chip microcomputer? Understanding this process can deepen the understanding of microcontrollers.
-
Summary. Hello, I'm glad to answer for you: the answer to the question of the principle of single-chip microcomputer is as follows; When the single-chip microcomputer program runs away or falls into a dead loop due to interference, the single-chip microcomputer can not operate normally, the single-chip microcomputer is the first processing unit (CPU), memory, input and output integrated on a chip, it can be said that the single-chip microcomputer is a microcomputer, but compared with the computer we usually use, its function is different, and it is not as powerful as the computer we use.
Hello, I'm glad to answer for you: the answer to the question of the principle of single-chip microcomputer is as follows; When the single-chip microcomputer program runs away or falls into a dead loop due to interference, the single-chip microcomputer can not operate normally, the single-chip microcomputer is the first processing unit (CPU), memory, input and output integrated on a chip, it can be said that the single-chip microcomputer is a microcomputer, but compared with the computer we usually use, its function is different, and it is not as powerful as the computer we use.
-
Solutions to some common problems of single-chip microcomputers.
There are many problems in work and life, which may make you fall into them for a while, but there is always a solution. Write down the problems you encounter at any time and summarize them well, which on the one hand helps to accumulate and on the other hand, to avoid repeating the same mistake.
There is only one interrupt entry, and conflicts caused by multiple interrupts should be avoided.
2.Pin level changes trigger interrupts, and external int interrupts do not enter the interrupt program when the total interrupt GIE is cleared.
3.When the microcontroller enters sleep, to wake up, it is often interrupted by pin level change or external int interrupt. In the case of the former, it will wake up when the button is pressed, and it will also wake up when the key is raised.
If there are other interrupts at this time, such as initializing the timer and setting GIE, the two interrupts will conflict.
4.If the IO port of the PIC microcontroller is used as the input pin, the comparator must be turned off during initialization, otherwise, it will not respond.
5.A watchdog overflow can cause the microcontroller to wake up from its sleep.
6.When using PT2262 and single-chip microcomputer as the transmitter, if the battery is used, it is necessary to save the most power. When normal, the single-chip microcomputer sleeps, and the PTT2262 is not powered on, the power supply of the PTT2262 can be controlled with a triode, and it is only powered on once when transmitted.
In the amplitude modulation circuit, the frequency selection inductor can be molded inductor, or it can be wound by itself, of course, it is best to use a ring PCB copper wire at one end.
The formula for calculating the length of the transceiver antenna: l=1 4 wavelengths; And the wavelength = calculate the best matching antenna is about 25cm, you can use a tie rod antenna, and of course you can use a long thick wire on the PCB.
9.The receiver uses a super regenerative receiving circuit, and the drawing that is commonly circulated on the Internet can be used after being moved down, and I also plagiarized it once, and I hope it can be used too. It's not easy to understand.
The MOS tube of the channel can not be used, not to mention the high cost, the on-resistance is large, the power consumption is large, and it is easy to open when the single-chip microcomputer outputs 0, but when the output is 1, if the MOS tube source is connected to a voltage higher than the high level of the single-chip microcomputer, it is constantly turned off, and it needs to be turned off with the help of three tubes.
10.If you set the vias to the outer diameter, the aperture is theoretically possible, but I was told that the PCB processing factory may not be able to do it, but I don't think it's a big problem.
11.Be patient when debugging. Calm down, reflect more, no one will succeed all at once, and they will fail many times before. When you can't figure it out, talk about the problem, and the bystanders will be clear, and others can give you enlightenment.
-
Please use the interrupt (good real-time), the speed of the single-chip microcomputer is relatively fast 1s, even if it is the entry 51, it can also reach 1us, 1s = 10 6us, the rush answer can also be met in the fast, but the program is executed sequentially, can not be processed in real time, in order to ensure sufficient recognition, the interrupt system of the single-chip microcomputer can be used.
-
The high 2-digit address line determines the chip selection 1 01 2 10 3 11 4
For 1 chip is fixed.
The lower 14 bits vary from 00 0000 0000 0000 to 11 1111 1111 1111.
So the first piece of address is 0000 0000 0000 0000 to 0011 1111 1111 1111 change.
i.e. 0000h to 3fffh
The second address is 01 00 0000 0000 0000 to 01 11 1111 1111 1111.
i.e. 4000h to 7fffh
The third slice address is 8000h to 0bfffh
The fourth slice address is 0c000h to 0ffffh
The total capacity of the 4 chips is 64k
-
74LS139 is a 2-4 line decoder, that is, 2 MCU IOs control 4 IOs, so the chip selection signal CE of 27128 is 4 separate controls.
74LS373 three-state output of the eight-D latch, here is used when the output address selection and data reading multiplexed IO port, a total of 8 IOs for 27128 address A0-A7 control, a total of 6 IOs for 27128 address A8-A13 control, address 2 to the 14th power = 16384
Therefore, the address range of 27128 is all the addresses of the 4 chips = 4 * 16384 = 65536, that is, 0 65535
27128-1:16k,0000h~3fffh27128-2:16k,4000h~7fffh27128-3:
16k,8000h~bfffh27128-4:16k,c000h~ffffh
-
Two bits, 8 bits, 6 bits, a total of 16 bits, the available address 0-65536 is a total of 8kbytes
-
1. Since it is AD conversion, what comes out is a digital signal, what does this have to do with voltage? For example, an input signal ad is converted to.
8-bit digital signal. It is a different voltage input value, and the conversion corresponds to a different 8-bit binary number.
For example 10011010. Digital circuits are generally integrated with CMOS, and the main output is voltage signal.
2. Generally speaking, the single-chip microcomputer writing refers to the burning of the programmed program into the chip, mainly with voltage. So you just have to write at the specified voltage. Actually, you don't have to worry about this, because each microcontroller has its own dedicated programmer, so you don't have to think about it at all!
3. The clock in the single-chip microcomputer is not inaccurate, but in the vast majority of cases, it does not need to be so accurate. Therefore, a relatively inexpensive clock element is used. For example, resistive capacitors, capacitors are cheaper, less accurate, and more expensive, and more stable. If you have an accuracy of the clock.
The requirements can be solved by using more expensive crystal oscillators. That is to say, the microcontroller can use different clocking methods!
-
1, AD is.
Analog-to-digital converters.
The input is. Analog, the output is.
Digital, not current or voltage, because MCU is.
Digital chips. It can only identify the digital signal of 0101, and then calculates the AD input from the proportional relationship between the obtained digital signal and the reference signal.
Analog voltage. 2. In circuit design, will follow the large.
Input impedance. Small output impedance.
The principle that the op amp can theoretically reach the input impedance infinity and the output impedance infinitesimus, but it is only a theory, and the single-chip microcomputer also follows it, so there is no need to deliberately calculate these data when designing, and it is good to have this idea when you use IC or serial resistance, and the resistance should not be too small, generally with 1K as the bottom limit.
3, the internal oscillator is indeed not accurate, but this is relative to your requirements, if you want to be very strict 5s, then it will definitely not work with it, if it is just an approximate delay period of time to let the trolley motor lag start, it doesn't matter, I wish you success
How is your light-emitting diode connected, if there is a power supply stringed to the light-emitting diode, the low level will be on, if it is the output port of the single-chip microcomputer, it will not be on.
Landlord, org 0030h.
How do you understand what I mean? >>>More
The emergence of this problem is relatively common, and there are several main aspects: >>>More
In this case, it depends on sp, ret is equal to (sp) pch, sp-1 sp (sp) pcl, sp-1 sp >>>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