The most basic interrupt source requests of the 51 kernel include external interrupts, timer interrupts and serial port interrupts, which are also the longest used by learners and developers. Of course there are other interrupt sources, such as ADC, SPI, PWM, etc. Take the external interrupt 0 as an example, the way often used in programming is: void INT0()interrupt 0 using 1 { ... } Here is a special note: The void INT0() in front of it just represents a normal function without formal parameters. Whatever the function name can be written, this is not important. Then there is a word-by-word button at the back: (2-1-ic-China-Electronics Network, anti-crawl) Among them, interrupt n forms a group. n is used to indicate the interrupt number. After the interrupt keyword is used after the function, an interrupt vector will be automatically generated. The 51-core interrupt number is as shown in the figure below. This is the MCU that I checked today: E.g: 12 interrupt 1 indicates that it is timer interrupt 0; interrupt 2 indicates external interrupt 1; interrupt 3 indicates that it is a timer interrupt 1 . . . For the 51-core MCU, the internal resources of different manufacturers and different models will be different. The above picture is a Zhongying SH88F516 MCU that I am developing. From the above picture, we can see that the internal resources are not bad and can satisfy general products. The following using n refers to the use of the nth group of registers. Before this, I often ignored this in the process of using it, and there was no problem. But today I noticed this problem. After checking the information, I found that the effect is not as good as not. It is quite possible that the reason for not using this knowledge well. After the comparison, I feel that when I write programs in C language, I don’t need it if I don’t need it. The search data explains that if using n is used in the interrupt function, the interrupt no longer saves the value of R0-R7, which means that if a high priority interrupt and a low priority interrupt use using n at the same time, and This n is exactly equal, then wait to cry, because this BUG is really not so easy to find out (I encountered this problem today). The second is the issue of interrupt priority. As shown in the interrupt table above, it is clearly marked in the second column on the right. Except for reset, external interrupt 0 has the highest priority. If you sort them down in order, then the problem is coming. , I just met today that the priority of serial port 0 is higher than the priority of timer 0. No way, I had to continue to gnaw the data sheet. Fortunately, there are not many registers. I found the following table and related descriptions in a while: So modify the priority according to the description to achieve the goal. Summary: After going back and using the 51 interrupt, I found that some things were not too concerned when I studied before, which resulted in the unclear purpose when I used it on the development product. Because the nature of work and learning are different, as a developer, quality is often the first requirement. At the same time, you will be exposed to many new things and technologies, but then again, the most basic knowledge still needs to be firmly established.
Compared with the traditional Membrane panel Switch using silver glue printed circuit as the circuit layer, FPC Membrane Switch (FPC Membrane Switch) is made of soft Copper foil (Copper Flex) FPC.
China FPC Membrane Switches, Digital Key Membrane Switch manufacturers, welcome Digital Key Membrane Switch Cover, Membrane Switches Graphic Overlays Kit purchasers from worldwide to visit our site. Fpc Membrane Switches,Digital Key Membrane Switch,Digital Key Membrane Switch Cover,Membrane Switches Graphic Overlays Kit KEDA MEMBRANE TECHNOLOGY CO., LTD , https://www.kedamembrane.com