Floating point operation instructions (FNC110-FNC1320) are used for floating point number processing. Floating point numbers are 32-bit numbers, including 13 instructions such as floating point comparison, transformation, four arithmetic operations, square root operations and trigonometric functions. All floating point processing instructions are 32-bit instructions. When used, the mnemonics of most instructions must be preceded by the 32-bit operation identifier "D". They are distributed in the instruction numbers FNC110~FNC119, FNC120~FNC129, FNC130~FNC139.
Binary floating point comparison instruction ECMP
(1) Binary floating point comparison instruction ECMP (FNC110) The use of the DECMP (P) instruction is shown in Figure 1. It compares two source operands and reflects the comparison result in the destination operand. If the operand is a constant, it is automatically converted into a binary floating point value for processing. The source operand of this instruction can be K, H and D, and the destination operand can be Y, M and S. It is a 32-bit operation instruction and occupies 17 program steps.
Figure 1 Use of binary floating point comparison instructions
Binary floating point interval comparison instruction EZCP
(2) Binary floating point range comparison instruction EZCP (FNC111) The function of the EZCP (P) instruction is to compare the content of the source operand with the range of upper and lower points specified by the binary floating point value, and the corresponding result is reflected on the target operand with ON/OFF, as shown in Figure 2. This instruction is a 32-bit operation instruction and occupies 17 program steps. The source operand can be K, H and D; the target operand is Y, M and S. [S1.] should be less than [S2.], and when the operand is a constant, it will be automatically converted into a binary floating point value for processing.
Figure 2 Use of binary floating point interval comparison instructions
Addition instruction E AD D
Subtraction instruction ESUB
Multiplication instruction EMVL
Division instruction EDIV
(3) Binary floating-point arithmetic instructions There are four floating-point arithmetic instructions: addition instruction EADD (FNC120), subtraction instruction ESUB (FNC121), multiplication instruction EMVL (FNC122) and division instruction EDIV (FNC123). The instructions for the four arithmetic instructions are shown in Figure 3. They all operate the floating-point numbers in the two source operands and send them to the target operand. When the divisor is 0, an operation error occurs and the instruction is not executed. This type of instruction only has 32-bit operations and occupies 13 program steps. The operation result affects the flags M8020 (zero flag), M8021 (borrow flag), and M8022 (carry flag). The source operand can be K, H, and D, and the target operand is D. If a constant is involved in the operation, it is automatically converted to a floating-point number.
Figure 3 Use of binary floating point arithmetic instructions
Binary floating-point operations also include instructions such as square root and trigonometric function operations, which are not explained here one by one.
Previous article:Methods for PID controller parameter tuning
Next article:Judging the abnormality and treatment of Mitsubishi PLC through LED indicator
Recommended ReadingLatest update time:2024-11-16 11:53
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
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
- TMS570 learning 2-bootload jump experiment
- An oscilloscope can only measure waveforms? That’s too narrow!
- Questions about System Control Block
- [AB32VG1 Development Board Review] RGB_LED Color Change Display
- Ask the big guy, about the problem of DS1302
- Why is DS heavily doped in the MOS tube structure?
- The free evaluation Perf-V development board has been successfully ported and run on the Wujian100 platform
- [Goodbye 2021, Hello 2022] Keep a low profile, face reality, and keep moving forward for your dreams
- How to display black text on white background in FPGA?
- EEWORLD University Hall----Application of IoT sensing technology