Wednesday, December 15, 2010

College】 【weak SCM application programming skills (FAQ)】..

<br> 1. C and assembly language in the development of which have their own advantages and disadvantages when the MCU? .<BR> A: The assembly language is a mnemonic used to represent the machine language instruction of sign language, is the closest to the machine code of a language. .Its main advantage is less resource, program execution efficiency. .However, different CPU, the assembly may vary, so difficult to transplant. .C language is a structured high level language. .The advantage is readable, easy to transplant, is commonly used in a computer language. .The disadvantage is occupied by more resources, there is no compilation of the efficiency high. .For the current widespread use of the RISC architecture 8bit MCU, its internal ROM, RAM, STACK, and other resources are limited, if you use C language, compiled a C language instruction, many items will become machine code, it is prone ROM .lack of space, the stack overflow problem. .And some manufacturers may not be able to provide microcontroller C compiler. .The assembly language, a command to a machine code corresponding to each step of the implementation of Shiyao actions are clear, and the program calls the size and stack conditions are easy to control, debug, it is also more convenient. .So in the SCM development, we recommend using assembly language better. .If you are interested in the language of the microcontroller C, HOLTEK microcontroller that provide C compiler can go to the HOLTEK website ( free download. .2. C or assembly language can be used in microcontrollers, C + + can it? .<BR> A: MCU development, mainly in assembly and C, did not use C + +,. .3. Engage in microcontroller development, must be C? .<BR> A: The assembly language is a mnemonic used to represent the machine language instruction of sign language, is the closest to the machine code of a language. .Its main advantage is less resource, program execution efficiency. .However, different CPU, the assembly may vary, so difficult to transplant. .For the current widespread use of the RISC architecture 8bit MCU, its internal ROM, RAM, STACK, and other resources are limited, if you use C language, compiled a C language instruction, many items will become machine code, it is prone ROM .lack of space, the stack overflow problem. .And some manufacturers may not be able to provide microcontroller C compiler. .The assembly language, a command to a machine code corresponding to each step of the implementation of what action is very clear, and the program calls the size and stack conditions are easy to control, debug, it is also more convenient. .Therefore, fewer resources microcontroller development, we recommend use of assembly language better. .The C language is a compiled programming language, which take into account the characteristics of a variety of high-level language, and with assembly language functions. .C language library functions are feature-rich, high operation speed, compiler, high efficiency, good portability, and can realize the control system hardware. .C language is a structured programming language, which support the programming is widely used by top-down structured programming techniques. .In addition, C language program has a sound module program structure, so as software development, modular programming method provides a strong guarantee. .Therefore, using the C programming language has become a mainstream software development. .Written using C language to the target system software, will greatly shorten the development cycle, and significantly increased the readability of the software, easy to improve and expand, thus developed a larger, more comprehensive system performance. .In summary, with the C programming language is a single chip microcontroller development and application of the inevitable trend. .So, as a comprehensive technology and large-scale software systems involved in the development of SCM developers best able to master the basic C language programming. .4. When the development of a more complex and shorter project development time, with C or better in assembly? .<BR> A: complex and tight project development time, you can use C language, provided that the requirements of the MCU system and C compiler, C language is very familiar with particular attention to the C compilation system can support data .types and algorithms. .Although the C language is the most common form of high-level language, but different manufacturers of the C language compiler MCU system is somewhat different, especially in some special function module operation. .If these features do not understand that there's trouble debugging it, the end may not come as fast assembly. .5. In teaching to use the 8088 and 196 microcontroller chip materials, ask where you can find information about the book or information in this regard? .<BR> A: The material in this regard, the university is a commonly used "IBM-PC assembly language programming," Tsinghua University Publishing House, in the book are online and can be found, and the other can also search the web .many other materials such as: "The Principle and Assembly Language Tutorial" (YANG Yan Zhang Xiaodong, eds double) and "16/32 bit computer theory, assembly language and interface technology" (Author: Zhong Xiaojie Chen Tao, Mechanical Industry Publishing House), etc., can be .Technology in the larger bookstores or directly from the online ordering find. .6. Beginners should first learn in the end is C or assembly? .<BR> A: MCU beginners should learn the from the assembly. .Because assembly language is the closest to the machine code of a language beginners can deepen understanding of each functional module microcontroller, thus laying a solid foundation. .7. I am a big 3 Electronic Science and Technology, Wuhan University students learn electronic circuits, digital logic, assembly and interface, C language, but always feel very confused and feel like nothing will. .How to do? .<BR> A: The University of the process is a theoretical process, relatively few opportunities to practice and often result in the disconnection between theory and practice, which is the common problem of university education system, but must not be ambitious for the students. .General from the junior will come into contact some professional courses, will create electronic related professional courses related to SCM application and there will be a simple pilot project, it is necessary to fully grasp the opportunity to experiment course, lots of actually operating practice. .Who are able to see more sites related to electronics magazines to see other people's development experience, hardware design and software design experience of others. .If possible, but also can participate in electronic design contest, to take this opportunity 2 - 3 people worked together in a complete system, will be more helpful. .To the senior graduate design stage, can also choose to make some practical issues related to the growth experience of cases. .Do anything the accumulation of experience has a process of gradual and orderly progress. .8. I ask as a student, how to learn microcontroller? .<BR> A: The study and SCM, the most important is to practice, gain experience in practice. .In the words of students, practice opportunities will be relatively small indeed, but there is a chance, you can select the relevant topics graduation practice, so that you can access to the actual item. .And if the principle is a single chip microcomputer core subjects, I believe that the school will arrange more opportunities for practice on the machine. .Have the ability, you can find some part-time work related to doing, will be more helpful. .And the development and application of microcontroller hardware and software needs, we can not just be satisfied with programming skills to perfection, usually have to pay attention to the accumulation of knowledge of hardware, and more on the electronic forum on the site, buy some relevant journals. .If possible, can go to the electronic market to buy some small part, his build a small system to make it to work. .HOTLEK RISC microcontroller is the structure of 8-bit microcontroller, it can be widely used in home appliances, security systems, handheld games and so on. .Probably it can be divided into I / O type microcontroller, LCD type MCU, A / D Type MCU, A / D with LCD Type MCU and so on. .These microcontrollers are open in the Chinese data HOLTEK our website .<BR> HOLTEK various SCM Manual Download: <BR> <BR> HOLTEK SCM software / hardware application examples Download: <BR> http .: / / / tech / appnote / appnote.htm <BR> HOLTEK SCM support tools Download: <BR> .9. How can it as a master MCU ah? .<BR> A: To become a master MCU, it should be more practice, often concerned about the development trend of Microcontroller; often some related sites, from where you can find many useful information. .10. Microcontroller software programming is suitable for women in this industry? .<BR> A: according to their interests, with their patience on the software programming, both men and women for the industry. .11. HOLTEK data sheet where to download? .<BR> A: If you are interested HOLTEK the IC, the corresponding data sheet can be selected to go to the site IC data download. .12.8 machine can for how long! .<BR> Answer: MCU products now or in the eight main areas, mainly used in automotive applications, consumer electronics, computers and PC peripherals, telecommunications and communications, office automation, industrial control six major markets, including multi-car market .In Europe and America, and Asia-Pacific region based Zeyi consumer electronics, and large low-priced products to the mainstream, the current 16-bit MCU with 8-bit product, there is a considerable range of spread, new fields of application are still .development, the industry is expected to at least 8-bit MCU 2005 MCU products are still the mainstream. .13. To learn whether the system ARM and embedded microcontroller is more than learning to use other general outlook? .For a beginner should have knowledge of what? .<BR> A: Generally in terms of 8-bit microcontroller with ARM embedded system is a level difference, ARM for greater complexity of the system, senior products, such as PDA, mobile phone applications. .The 8-bit microcontrollers for simple structure, relatively few hardware resources, for general industrial control, consumer appliances and so on. .For a SCM software programming for beginners, HOLTEK series or 8051 should be 8-bit microcontrollers such as entry to practice doing. .The beginner should have knowledge of software programming, microcontroller programming is a general software-based assembly language, each with each of the syntax, but most of the RISC-based MCU architecture, in which RISC (Reduced Instruction Set Computer) MCU's behalf .all instructions. .Are formed using some simple instructions, simple instructions on behalf of the line can be as far as possible MCU optimization, and improve the implementation rate. .Also for beginners to have a microcontroller I / O interface, the application of knowledge, which is applied around the circuit and the use of a variety of components to be learned with their own electronics and electrical science. .14. Meet 44PIN 80 Series MCU 8-bit microcontroller What? .<BR> A: meet 44PIN 80 series 8-bit microcontroller with Z8674312FSC, Z86E2112FSC, Z86E2116FSC. .15. Please tell us about MCU testing methods. .<BR> A: MCU package from production to shipping out of each of the different stages have different test methods, which mainly have two: the test and into the test. .WAFER measured is the so-called test, which will include functional verification products and the AC, DC testing. .Considerable range of projects to HOLTEK several major products, the following example:  continue testing: testing every root I / OPIN internal protection diodes if used functions correctly. .<BR>  Functional test: The test data provided by the product designers (TEST PATTERN) poured into the IC, check whether the results when the state was the same SIMULATION. .<BR>  STANDBY current test: measurement IC is in HALT mode, that is, each junction (PAD) in a state 0, state or Z state is constant leakage current meets the minimum specifications. .<BR>  Power consumption test: whole pieces IC static power and dynamic power consumption. .<BR>  Input voltage test: Measure the input pin for each input voltage response characteristics. .<BR>  Output voltage test: measure the output pin for each output voltage level. .<BR>  Related frequency (AC) test, also through foreign exchange certain frequency, from the I / O port output is matched terms. .<BR>  IC in order to ensure the long-term and stable production quality, product reliability testing will be done, these tests include ESD testing, LATCH UP test, temperature cycle test, high temperature storage test, humidity storage test. .Is the product packaged as a good test after test, the PACKAGE test. .All that is measured by testing packaged products, the method is mainly automatic testing machine, but the test program is still the same with WAFER TEST. .PACKAGE TEST is aimed at determining the course of IC in the package for any damage. .16. The possibility of using single chip to detect the cell phone battery charge and discharge time and charge and discharge voltage and current changes, and using an I / O port so that test results are displayed on the computer? .<BR> A: At present various types of smart battery charger on the market, most of the MCU are used for charging current and voltage control. .As for the computer display, if not practical, possible only in some special battery test instrument will be used; for the average mobile phone user, who will also be required in the charge to do with a computer display .it? .To achieve single chip connected to the computer, the easiest way is to use serial communication, but need to add an RS-232 chip. .17. In the ARM programming and how it should be? .<BR> A: The concept of an embedded system as an example to the general embedded processor can be divided into three categories: Embedded microprocessors, embedded microcontrollers, embedded DSP (Digital Signal Processor). .Embedded microprocessors and general-purpose computer microprocessor is the corresponding CPU. .In the application, the general assembly is in the specially designed microprocessor board, the motherboard only features related to retention and can be embedded, so that embedded systems meet the small size and low power consumption requirements. .The current embedded processors include: PowerPC, Motorola 68000, ARM series and so on. .Also known as single chip embedded microcontroller, it CPU, memory (a small amount of RAM, ROM or both) and other interfaces I / O package with an integrated circuit in the. .Common are HOLTEK MCU series, Microchip MCU series and 8051 and so on. .Embedded DSP designed to handle very fast on the discrete-time signal processing terms, to improve the efficiency and execution speed of compiled. .In digital filtering, FFT (Fast Fourier Transform), spectrum analysis, image processing, analysis and other fields, DSP is poured into the embedded market. .18. MCU control in radio, MCU clock (crystal), the data lines will radiate baseband or baseband frequency, amplified by LNA LNA into the mixer, there with the Spur, can not be filtered out. .Apart from using the layout, select the low radiation method can reduce the number of MCU, there are any other ways? .<BR> A: The high-frequency circuits in the design of the circuit board has a lot of attention, especially the GHz level high-frequency circuits, but also to note pad of the electronic components and printed circuit pattern on the length of the impact characteristics. .In recent years high-frequency circuits and digital circuits share the same circuit board, constitute the so-called mixed system containing the circuit seems to be an increasing trend, similar to the design of such digital circuits often result in action, the high frequency circuit operation is unstable phenomena occur, .One reason is a digital circuit to generate the noise, caused by normal operation of high-frequency circuits. .To avoid this problem but to try to split the two circuit block, the design review board before the full design concept, is the fundamental approach should be basically the design of high frequency circuit board must be mastered by the following three principles: & # 61548 .; high texture. .<BR>  Not tricky. .<BR>  Not rush rush time. .Following is a high-frequency circuit board design suggestions: (1) the length of the printing pattern will affect the circuit characteristics. .Especially the transmission speed of high speed digital circuits GHz transmission line, usually using strip line, at the same time to make corrections by adjusting the length of wiring transmission delay time, in fact, this also means that electronic components on the circuit characteristics of the setting position of influence with the absolute .. .<BR> (2) Ground for large better. .The whole set of copper foil ground plane layer, and the better ground connection is via high-frequency circuit boards and high-speed digital circuit boards common features, in addition to the most taboo to use high-frequency circuit board printed pattern width were thin paint ground. .(2) ground terminal electronic components, the length of the shortest circuit board ground connection. .The specific method is in the electronic components of the ground terminal pad near the via, so that electronic components can in the shortest possible length of the circuit board ground connection. .(3) signal line for short wiring design. .Wiring is not any greater length of the wiring length as short as possible. .(4) reduce the binding between circuits. .Especially between the filter and the amplifier input and output is very important for circuit partitioning, which is equivalent to audio circuit cross talk countermeasures. .(5) MCU Circuit Layout Considerations: oscillator circuit may be close to the IC shocks only pin; oscillator circuit with VDD & VSS keep enough distance; oscillation frequency greater than 1MHz, without additional osc1 & osc2 capacitor; power and ground to .minimum position and try to pull the line width and offset, in the position of the node with 104/103/102 and other ceramic capacitors. .19. Intel 96 series MCU 80c196KB development system, are those precautions? .<BR> A: A real-time system, real-time operating system software with the application form. .Application and operating system interface through the system call. .Operating system with 80C196KB MCU, can only be used as the TCB and all the internal RAM of system memory (including the various control tables) and the work of each task and information unit. .Therefore, we must note the following: (1) of the various tasks assigned their respective stacked area, stacked area, both as the unit of work tasks, but also as a task control block of the protection unit. .(2) system task control block only records of the task targets stacked, while the status of the task are stored in the task of vertebral stack. .Out of operation in a task, through the disruption to its state into the stack, and then save it stacked in the system's TCB indicators in; out according to priority the highest priority ready task stacked index value to send SP images .into the SP in; final transfer interrupt return instruction to perform new tasks. .(3) the task of information and work units to achieve the best use of stacked, which allows each task to use the same subroutine. .Achieved using the stacked parameter and as a unit of work, instead of using the absolute address of the RAM, can be realized reentrant subroutines. .The subroutine can call for various tasks can also be realized recursive calls. .20. In the demo board, sample voltage, the instability, fluctuations in the sampling results, how to eliminate? .<BR> A: Generally speaking, the simulator is operating in a regulated environment (typically 5V). .If emulator A / D, we should pay attention to the A / D reference voltage is given by the emulator, or the need for external offer. .A / D conversion requires a continuous clock cycle, so can not be used in the simulation time stepping method, otherwise it will create A / D samples are not allowed. .As for the A / D sampling instability in the A / D input plus one capacitor filter to play the role; in the software processing by median filtering method. .21. In car DVD systems, how to design electronic stabilization system? .<BR> A: In-car DVD systems, the best choice for high-end DVD machines, because the high-end DVD machines are electronic shock system (ADVANCEDESP), when the reading of the memory buffer reduces, advanced electronic shock-proof design will double speed reading system .made twice as fast than normal reading speed to reduce noise, vibration can still be avoided even if the consecutive jumpers to happen, and now to talk about Shiyao called electronic shock. .Simply put: electronic stabilization is a signal of storage - the release process, the first CD to be first read signals in advance, that is, we see the acceleration of the machine, then signals stored in RAM, and we opened shockproof .After that time heard the voice of RAM, so is its process. .When there is no shock when the signal is 1 to 1 to read, so when the subject after impact, there will be skips. .Shock when opened, the machine under attack, by the sound of RAM released music kept playing, but at the same time, bald quickly reset search, when added immediately after retrieving the signal, it will not skips .. .Probably is the case. .But this still did not meet the requirements of users, because this approach brings a short time, usually only 3 seconds, so skip the chance is still pretty high, if the increase brings the cost of the increase in RAM because RAM prices of this stuff .expensive, especially good quality. .22. In the electronic anti-shock technology, there are IC or device available? .<BR> A: electronic stabilization technology, one of the most important technology is to the number of RAM technology, and has always been because of its cost, so the time has not been able to increase earthquake, that RAM limit itself ., RAM capacity of the larger, the higher the cost. .Many manufacturers on how to get the maximum RAM limit in the memory of the time launched a research and development. .23. How do procedure program can reduce the bug? .<BR> A: Here are some suggestions for the actual operation of the system are a range of parameters. .Operation of the system of range management to consider parameters: <BR> <BR>  physical parameters. .These parameters are mainly the input parameters, which includes incentive parameters, acquisition and processing of the operating parameters and processing parameters of the end result. .Reasonable to set these boundaries, beyond the boundaries of the parameters will be considered non-normal or normal response to incentives error handling. . Resource parameters. .These parameters are mainly system circuits, devices, functional unit resources, such as memory, storage unit length, stacked depth. .In programming, parameter is not allowed beyond the scope of resource use. . Application parameters. .Parameters usually presents some of these applications MCU function unit application conditions. .Such as the E2PROM of endurance time of application and data storage parameter limit. . Process parameters. .Refers to the orderly operation of the system parameters change. .In the above parameters of a group of writers, the need to develop good habits, in the beginning of the program, a sequence of arguments correspond with the list of their favorite characters to replace, and then use their own parameters to define programming language, so do .modification and maintenance program is only the beginning of the program can make changes, without changes to the program segment is rather easy and not go wrong. .24. Some people think that will be ARM microcontrollers and other embedded systems to replace the structure. .SCM lifetime much longer? .<BR> A: Because the 8-bit microcontroller with ARM embedded system in the functional structure and price differences, so the application level, there are very different. .ARM for greater complexity of the system, senior products, such as PDA, mobile phone applications. .The 8-bit microcontrollers for simple structure, relatively few hardware resources, suitable for general industrial control, consumer and home electronics ... ... and so on. .ARM MCU assessment will replace the near future, to observe two factors:  ARM chip cost <BR> work for high frequency circuit than large chip manufacturing process requirements required in the 0. 25U more .higher cost. .8-bit microcontroller operating frequency is relatively low, the circuit smaller chip manufacturing process required in the 0. 5U can be low cost. . Function than the function of positioning <BR> ARM microcontroller strong, but the two different orientation. .As this stage, no one will use the ARM to make a simple timer switch industries. .Of course, if the two can not be priced the same and no, but the reality is a great price gap. .As for the future, due to falling chip manufacturing costs, the cost difference of less and less! But I guess there in the next 5 years the price advantage of single chip, can survive! But ARM will streamline its structure, reduce costs, snatch .low-end market? .I think unlikely, ARM should be upward. .Similarly, the MCU can only move upwards, such as 16-bit, high-function ... ... and so on. .The reason is because the chip manufacturing process is moving so rapidly. .Oppression to the highly integrated chip design development. .25. In the microcontroller C compiled, how can the generated code and compiled with the same efficiency? .<BR> A: If you are using C language programming, is unlikely to generate and compile the code with the same efficiency of 1:1. .C language commands the hardware to be identified and implemented, must pass compiler. .The compiler is divided into front, middle end, back-end. .Front-end with a variety of computer programs written in dealing, back-end processor's basic instruction set standards. .So if you use C programming to achieve the highest efficiency, best use can be very understanding of the C compiler. .First to test after every C compiler in assembly language statement corresponds to the number of rows, which makes it clear that efficiency. .When programming in the future, the most efficient use of compiled statements, this way we can ensure that the microcontroller C programming of different functions when the same C program, compiled for maximum efficiency. .But each of the C compiler will have some differences, good C compilers for embedded system code size and execution time is only written in assembly language than to the extent the same functions as long 5-20%, so different manufacturers of the C compiler .compiler efficiency will be different. .26. ARM microcontroller and the microcontroller core which is closer? .<BR> A: Strictly speaking, ARM is not a single chip, is an embedded real-time operating system. .ARM (Advanced RISC Machines) is the microprocessor industry, a well-known companies, design a large number of high-performance, low-cost, low power consumption RISC processors, related technologies and software. .ARM will license its technology to many of the world leading semiconductor, software and OEM manufacturers, are set by each firm unique ARM-related technologies and services. .So the market as Intel, IBM, LG Semiconductor, NEC, SONY, Philips and National Semiconductor have big companies like ARM series, and now there is no Shiyao ARM microcontroller and microcontroller cores closer to what the problem. .And because manufacturers will buy core chip applications based on their orientation, add their own plug different modules, so it provides the same core chip functions are different. .27. From 51 to ARM be a problem? .<BR> A: From 51 to ARM, in fact, the principles of programming and the like are the same, but be aware that the ARM is a RISC architecture, the application of open source in the ARM program a lot, in order to improve themselves, .we should look at other people's programs, linux, uc / os-II, etc. These are all very good source. .28. I learned MCS51 MCU materials, very interested, but the lack of practical experience, without any props on hand for the exercise, and limited funds, I ask how to do? .<BR> A: There are no conditions in practice, if really interested, you can download some software simulation function simulation software with some programming, as some have done better 51 simulation software should have this feature. .HOLTEK HT-IDE3000 simulation software also has the corresponding function, but it also has the LCD software simulation, software simulation of peripheral circuits. .Are interested, you can go to the free download: .At the same time can go to some electronic device market to buy some simple exercises take about their own circuit to enhance the knowledge of the hardware. .29. If you already have a MCU for the C implementation of an algorithm to maintain the same framework, the core part of the assembly optimization, is there some of the more general principle? .<BR> A: Everyone has their own programming style and habits, if you want to use someone else's program, in which the amendments modify the change, if he's not a very good program and modular, the proposal would be so better not to do .otherwise have been expected to achieve much, maybe instead redoubled. .The procedure to refer to others of course, but first and foremost is to read and understand the essence of another algorithm process, rather than based on his patch. .The terms on the optimization algorithm, some data structures can buy books, a more detailed description of the above. .30. If an algorithm for estimation of the MIPS, have any good way? .<BR> A: The algorithm is an algorithm running time is spent on the computer operation time. .It is roughly equal to the computer to perform simple operations (such as assignment, comparison operations, etc.) the time required to operate with a simple algorithm, the number of the product. .Algorithm is usually a simple number of operations is included in the amount of time is called the complexity of the algorithm. .It is a relative measure of algorithm running time, usually given in the form with a orders of magnitude. .Measure the execution time of a program there are usually two ways:  A statistical method is the post. .Because a lot of time inside the computer has a function of different algorithms by a set of procedures or groups of the same statistical data to identify strengths and weaknesses. .However, this method has two drawbacks: First, they must be programmed to run based algorithm; Second, statistics from the time depends on computer hardware, software and other environmental factors, and sometimes easier to cover up the algorithm on their own merits. .Therefore, it is often estimated using an alternative method of analysis in advance. . An analysis based on a prior approach. .A program running on the computer time consumed depends on the following factors: (1) selection algorithm based on what strategy; <BR> (2) scale of the problem. .Such request within 100 or 1,000 less than prime; <BR> (3) written procedures for the language. .For the same algorithm, the higher the level of language, the lower the efficiency; <BR> (4) compiler generated machine code quality. .The compiler with relevant; <BR> (5) the speed of the machine executing instructions. .Obviously, the same algorithm in different language, or use a different compiler to compile or run on different computers, the efficiency are not the same. .This shows that the time unit used to measure the absolute efficiency of the algorithm is not appropriate. .Leaving aside those with computer hardware, software-related factors, a specific algorithm can be considered "run the workload," the size, only depends on the scale of the problem (usually indicated by a whole number of n), or that it is a function of size of the problem. .An algorithm is a control structure (sequence, branch and loop of three) and the original operation (refer to data types inherent in the operation) to form, the algorithm depends on the combined effect of both. .For comparison purposes, the same problem with different algorithms, the usual practice is to select from the algorithm for the study of a problem (or algorithm type) is the basic operation of the original operation to repeat the number of basic operations as the algorithm .time measure. .MIPS algorithm has a special knowledge, you can go to make reference to the relevant data structure books. .31. Remote codec thinking and design process like? .<BR> A: Generally speaking, the first complete remote control codes into code, address code, data code and check code of the four components. .The first code according to different manufacturers vary, address code and data code by logic "1" and logic "0" component. .Code is designed to, is in accordance with the encoding rules to send a different code value. .The most common pattern we have SONY, Panasonic, NEC and other manufacturers models. .Remote encoding chips are the most commonly used air-conditioning, DVD, remote control garage doors. .Design coding process can be divided into three parts. .The first part is a decoder-based features. .The first remote control codes and address codes (also known as client code) is fixed, the data code and parity code to change according to different keys. .The second part is to calculate the fat code time. .Mostly by remote control code logic "1" and logic "0" component, which is fixed by a string of duty-cycle, fixed cycle, consisting of a square wave. .Often, these square-wave cycle is milliseconds or even microseconds level, you need more precise calculation of the time. .So, the selection made when the type of the MCU code, we must take into account the speed of the microcontroller is not fast enough, and enough time to run. .The third part is the process of the preparation. .SCM model selected, the start the design process flow. .Generally we use the I / O port to send code to do the output port. .Development Code procedures are generally composed of several subprograms, the first distinctly different procedures, logic 1, subroutines, logic 0 and the checksum algorithm subroutine subprogram. .Once we receive the order to send the code, the first call the first distinctly different procedures, codes and keys according to the customer then calls the subroutine logic 1 or logic 0, subroutine, the last subroutine call checksum algorithm output checksum. .HOLTEK company HT48CA0/HT48RA0, HT48CA3/HT48RA3 and HT48CA6 remote control designed specifically for the microcontroller, which has a special infrared output can be made to achieve most of the code requirements. .Designed decoder can be divided into three parts. .The first part of the understanding of coding waveform characteristics. .Code from the analysis of high and low pulse width start to understand the logic "1" and logic "0" waveform duty cycle, period. .Understanding of the characteristics of the first code. .The second part of the way to determine the receiver. .Generally, we can use I / O port query method or methods INT interrupt port to receive code. .This is the difference between the two I / O port MCU-consuming way to check the running time of resources, the need constantly to detect I / O level changes, so as not to miss a valid code value; the INT port interrupt receiving mode is relatively .save resources, there is level when the external changes, the microcontroller only needs to deal with, do not always detect. .But the INT port interrupt reception the same way can not distinguish the different duty cycle of the waveform characteristics, when the code carried by the logic "1" and logic "0" with this feature, the port can not be interrupted by INT method to identify the receiver, .because the INT interrupt only when it is rising or falling edge trigger. .The third part will receive the code value is stored and analyzed implementation. .According to judge the width of high-low (timer or delay), can be code value, which is what we call the decoding. .Generally, we receive three consecutive complete the same code values, to confirm the code has indeed been issued, and successfully received. .When the decoding end, according to code value we can determine which button is pressed, the corresponding button to perform this function. .HOLTEK company HT48 and HT49 (with LCD) Series MCU, can meet most of the decoding task. .32. Microcontroller in the learning process, how to understand the prescaler, 12-clock mode (6-clock model) concept? .<BR> A: English is the prescaler prescaler. .It is the frequency of the input signal frequency, and then output. .How is this going? .How to do? .Work test for a long time, the SCM system reliability. .You can use the simulator to test various kinds of interference SCM system reliability. .How to do? .SCM is the interference phenomenon of the most common reset; The program running out, in fact, the software can also use traps and watchdog reset the program back to the state; so anti SCM software to handle the most important thing is reset. .Reset each time the program, through the judgments of these signs, you can determine the reasons for the different reset; different flags can also jump directly to the appropriate procedures. .This allows a continuous run, users will not be aware of when using the program is off to reset..

No comments:

Post a Comment