8558 views|0 replies

6

Posts

0

Resources
The OP
 

Lesson 1: 51 MCU Minimum System [Copy link]

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;


single-chip microcomputer: atmel's 89C51 series, winbond's 78E52 series, and philips series, are all similar; now some have ISP (online download), which is more convenient;


watchdog: there are many types, I often use max691/ca1161 and DS1832, etc., depending on personal habits, chip operating voltage, packaging, etc. Max series and DS series, as well as IMP
company , there are many types, generally only need to have the most basic functions; I used max691, but max691 is more expensive because it has a battery switching function. Later, the new circuit board design
uses ca1161.


In the circuit design a long time ago, some people may still use it now, using a resistor and a capacitor to achieve the power-on reset circuit; however, such a reset circuit is unreliable. Why is it unreliable? You can find articles on reset circuits on the Internet. The answer to this question is left to everyone.


The conventional approach is to buy a dedicated watchdog circuit to complete the functions of the reset circuit and the watchdog circuit.

The information of these chips can be easily found on the Internet, usually by searching on Baidu; click to download when you see the word PDF; it is also best to download using FlashGet; these materials
are usually in PDF format, so you also need a PDF reader (these software are easy to find on the Internet). Baidu website: http://www.baidu.com/


In fact, with Baidu and other search engines, it is very convenient to download the information of these chips, which is more convenient than CDs, and you don’t need to look for them everywhere.


The anti-interference ability of microcontrollers is different. If your product works in an environment with relatively large interference, you can try to choose microcontrollers of different brands.


The input and output lines of the microcontroller are the most likely to introduce interference; in the case of severe interference, all the 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, which 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 make an RS232 and keep it for testing, or reserve it, etc. There is no harm. Unless your microcontroller system does not have enough lines.


4. Magnetic capacitor: 22pf~30pf. You can find out what kind of magnetic capacitor corresponds to what crystal frequency in some books. However, I just use it randomly. Anyway, there is no problem at 11.0592M. If you use a higher frequency, it is better to look for information.


If your microcontroller 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. This will be more convenient. If the watchdog reset signal is present, pull it down.

(2) Check the microcontroller to see if there is any problem with the pin. Generally, the programmer can write the program, which means that the microcontroller is good. It is best to have a verified microcontroller on hand with a simple program inside, such as outputting a square wave with a duty cycle of 1 second on a certain port line, which can be measured with a multimeter.

One more sentence: When designing a product, different colored LED indicators should be added to key places such as power supply, serial port, watchdog output and input, I/O port, etc. to facilitate debugging; for large-volume products, 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 tin-absorbing tape to absorb the tin in the pads when replacing components, and then pull out the components, so as not to damage the vias in the pads; when soldering the new ceramic chip capacitors, use a multimeter to measure whether it is good before soldering;

(4) Finally, you can only 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 cause the microcontroller minimum system to not work.
This post is from 51mcu
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list