Common Microcontroller Faults and Solutions

Click the blue textCommon Microcontroller Faults and SolutionsFollow me!

The official WeChat of Jicheng Training Network is the industrial control WeChatwith the most concentratedand specializednumber of people, providing technical articles, free video tutorials, and a free communication platform. Follow Jicheng, and there will be no problem in improving your skills! Consultation Q:4001114100

Source: jcpeixun

Common Microcontroller Faults and Solutions

In work and life, you will encounter many problems that may trap you for a while, but there is always a solution. Always note the problems you encounter and summarize them, which helps accumulate knowledge and also avoids repeating the same mistakes.

1. The PIC12F629 has only one interrupt entry, so avoid conflicts caused by multiple interrupts.

2. Changes in pin levels trigger interrupts, and external INT interrupts will not execute when the global interrupt (GIE) is cleared.

3. To wake up the microcontroller from sleep, it often uses pin level change interrupts or external INT interrupts. If the former is used, pressing a button will wake it up, and releasing the button will also wake it up. If there are other interrupts at this time, such as initializing a timer with GIE set, there will be a conflict between the two interrupts.

4. If the I/O port of the PIC microcontroller is used as an 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 sleep.

6. When using PT2262 with the microcontroller as a transmitter and powered by a battery, it is necessary to minimize power consumption. Normally, the microcontroller is in sleep mode, and the PT2262 is powered off. A transistor can control the power supply of the PT2262, powering it only once during transmission.

7. In the 315MHZ amplitude modulation circuit, the selection of frequency inductors can use molded inductors or be wound manually, but it is best to use a PCB copper wire in a ring shape.

8. The length calculation formula for the 315MHz transmitting and receiving antenna is: L=1/4 wavelength; where wavelength=3.0*10^8/315MHz, resulting in an optimal matching antenna of about 25cm, which can use a telescopic antenna, or a long thick wire on the PCB can also work.

9. The receiving end uses a super-regenerative receiving circuit. The commonly circulated schematic on the internet can be used after being copied; I also borrowed it once, hoping it can be useful. It’s really not easy to understand.

10. P-channel MOSFETs should be avoided if possible due to their high cost and large on-resistance, leading to high power consumption. When the microcontroller outputs 0, it is easy to turn on, but when it outputs 1, if the source of the MOSFET is connected to a voltage higher than the high level of the microcontroller, it cannot be turned off, requiring a triode to turn it off.

11. Setting the via to an outer diameter of 0.4mm and a hole diameter of 0.2mm is theoretically possible, but someone told me that PCB manufacturers might not be able to do it; however, I think it is not a big issue.

12. Patience is essential during debugging. Stay calm, reflect more; no one succeeds immediately; everyone has failed many times before. When confused, express the problem; outsiders can provide insights.

Common Microcontroller Faults and Solutions

What can you gain by following the “Jicheng Training Network” WeChat? =Learning atmosphere + core technology + free video + communication platform

Click 【Read the original text】 for more exciting content!

Common Microcontroller Faults and Solutions

Leave a Comment