Why should we acquire this knowledge?
In fact, electronic engineers put a bunch of devices together, inject ideas (programs), complete the functions that these devices could not complete when separated, and make a finished product. The higher the skills required, the more complex the functions, the lower the cost, and the greater the demand for the corresponding things in the market, the more successful they are. This is the value of electronic engineers themselves. The difference between the cost and the product sold is the pursuit of the company. As the boss of the company, you look for such applications in the market; for electronic engineers, it is to complete the needs or applications proposed by the boss in the shortest time according to certain conceptual principles (lowest cost, highest reliability, smallest circuit board, most powerful function, etc.). The shortest time is directly related to the proficiency, work efficiency and working hours of electronic engineers. This is the value of electronic engineers.
Abstracting electronic products into a hardware model consists of the following components:
1) Input
2) Processing core
3) Output
The input possibilities are basically:
1) Keyboard
2) Serial interface (RS232/485/can bus/Ethernet/USB)
3) Switching quantity (TTL, current loop, dry contact)
4) Analog (4~20ma, 0~10ma, 0~5V (balanced and unbalanced signals))
The output basically consists of:
1) Serial interface (RS232/485/can bus/Ethernet/USB)
2) Switching quantity (TTL, current loop, dry contact, power drive)
3) Analog (4~20ma, 0~10ma, 0~5V (balanced and unbalanced signals))
4) LED display: LED, eight-character
5) LCD display
6) Buzzer
The main processing cores are:
1) 8-bit microcontrollers, mainly 51 series
2) 32-bit ARM microcontrollers, mainly atmel and Samsung series
It seems that the 51 series of MCUs can only do some simple applications. To put it bluntly, this chip can only do a single thing. If it does too many things, it is better to use ARM to do it. You can also add an operating system to the ARM, and the program will be both reliable and easy to write.
Recently, Samsung's ARM has been popular. It is cheap, has Ethernet and USB interfaces, and Zhou Ligong's development system is also cheap. As a product for learning ARM, it should be the best; as an industrial-grade control, whether it is suitable or not, there are different opinions and disputes among netizens. Our company uses the atmel ARM91 series to develop an outdoor product. It is used outdoors in Beijing without any ventilation and heating measures. From May last year to now, it has been running well. There is already a successful application case.
But for beginners, they should start with 51. On the one hand, 51 is still an entry-level chip, so it is a good start for beginners to practice and go through the above concepts. Many special microcontrollers also add some I/O and A/D, D/A based on the core of 51, which also lays the foundation for learning higher-level microcontrollers and ARM in the future. Besides, which boss would put ARM-level development in the hands of a novice who has not even learned 51?
It is not necessary to do complex parallel expansion on 51. For example, to expand I/O ports and A/D, D/A, etc., you can directly buy a microcontroller with A/D, D/A; or directly use ARM, which has many I/O ports. You can use chips with I2C interface to expand I/O ports and A/D, D/A, and SPI interface to expand LED display, such as: MAX7219 and other chips.
Some older books on the market have some examples of parallel expansion, such as RAM, EPROM, A/D, D/A, etc. I don't think it's necessary to read them. Just know that these things existed in history.
This knowledge is an element that all products have. So you have to learn it and then apply it in specific situations. [page]
In fact, the core peripheral circuit of 51 single-chip microcomputer is very simple, a single-chip microcomputer + a watchdog + a crystal oscillator + 2 magnetic capacitors;
1. MCU: Atmel's 89C51 series, Winbond's 78E52 series, and Philips' series are all similar; some now have ISP (online download), which is more convenient;
2. Watchdog: There are many types. I often use max691/ca1161 and DS1832, etc. It depends on personal habits, chip operating voltage, packaging, etc. Max series and DS series, as well as IMP company, have many types, and generally only the most basic functions are needed; I used max691 originally, but max691 is more expensive because it has a battery switching function. Later, when I designed a new circuit board, I used ca1161.
A long time ago, in circuit design, some people may still use the power-on reset circuit which uses a resistor and a capacitor. However, such reset circuit is unreliable. Why is it unreliable? You can find articles on the Internet that specifically discuss reset circuits. More importantly, the 51 series of microcontrollers are more susceptible to interference. Without a watchdog circuit, it will not work. When the program runs away, it cannot come back and will die there.
The common practice is to buy a dedicated watchdog circuit to complete the functions of the reset circuit and the watchdog circuit.
The anti-interference ability of single-chip microcomputers is different. If your product works in an environment with relatively large interference, you can try to choose a single-chip microcomputer of a different brand; I used to work in an optoelectronics institute, working on the control part of a YAG laser therapy machine. When the power supply of the pulse laser machine discharges, the energy is very large. After taking all the conceivable measures such as optoelectronic isolation, it still didn't work; later, I chose Intel's 8031, and it worked. In a low voice: the anti-interference performance of Philips' single-chip microcomputer at that time was the worst, which may be related to the fact that Philips is mainly used in the civilian field.
The input and output lines of the microcontroller are the most likely to introduce interference; in the case of severe interference, all lines need to be optically isolated.
3. Crystal oscillator: Generally, 11.0592M is used, because it can accurately obtain 9600 baud rate and 19200 baud rate; 36.864M can also be used, this frequency is 20 times of 1.8432M, I have seen it used on other people's circuit boards, but I have not used it. These two crystal oscillators are easy to buy, and the price is the same as 12M. The book says that the 12M crystal oscillator can also obtain a baud rate of 9600, but when it is actually used, it will make mistakes every once in a while, as if the error is accumulated, which is quite strange.
Even if your microcontroller system does not use the RS232 interface, you can still make one and keep it for testing or for future use, there is no harm, unless your microcontroller system does not have enough lines.
4. Magnetic sheet capacitor: 22pf~30pf. You can find out what capacity of magnetic sheet capacitor corresponds to what crystal frequency in some books. However, I just use it casually. Anyway, there is no problem under 11.0592M. If you use a higher frequency, it is better to look for some information.
If your MCU system does not work, check the following steps:
1. Check the reset output of the watchdog. If possible, add an LED to the circuit board and pull it down, so it looks more convenient; if the watchdog reset signal is there, pull it down;
2. Check the MCU to see if there is any problem with the pins. Generally, if the programmer can write the program, it means the MCU is good. It is best to have a verified MCU on hand with a simple program inside. For example, a square wave with a duty cycle of 1 second is output on a certain line, which can be measured with a multimeter.
One more sentence: When designing a product, you should add different colored LED indicators to key places such as power supply, serial port, watchdog output and input, I/O port, etc. to facilitate debugging; for products with large batches, some LEDs can be removed, on the one hand to reduce costs, on the other hand to keep the process confidential;
3. Check the magnetic chip capacitors again. Some ceramic chip capacitors are of poor quality, so just replace them. By the way, it is best to use a tin-absorbing tape to absorb the tin in the pads before removing the components. This will not damage the vias in the pads. When soldering the new ceramic chip capacitors, use a multimeter to measure whether they are good before soldering.
4. Finally, you have no choice but to replace the crystal oscillator; remember to buy a good crystal oscillator, some brands have better quality.
5. When testing according to the above steps, remove irrelevant peripheral chips; because some peripheral device failures may cause the MCU minimum system to not work.
Previous article:Some Experiences in Making Single Chip Microcomputer
Next article:A Brief Discussion on the Application of Single Chip Microcomputer
Recommended ReadingLatest update time:2024-11-16 20:29
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- How to measure AC impedance?
- Studying Things to Gain Knowledge—by maychang
- It seems like I'm in trouble. I dropped a bunch of chips on the ground. I have to pick them up with my hands or tweezers. I'm waiting online. It's urgent.
- 27 operators "abandon Huawei"! The United States released the list of "5G clean networks"
- A summary of the most downloaded electronic technical materials this week (2020-04-17)
- JTAG debug test access port TAP
- About serial port loopback test
- 【ST NUCLEO-G071RB Review】SPI
- The rice dumplings exchanged for Chip Coins arrived so quickly
- ADC and analog switch issues