|
|
||
|
AN1061 Efficient Fixed-Point Trigonometry Using CORDIC Functions For PIC16F TABLE 1: SIN(x) FUNCTION CALL Author: Jose Benavides SPECIFICATIONS WITH Microchip Technology Inc. PIC16F877A AT 20 MHZ CORDIC in asm Math.h in C INTRODUCTION Time 370 µs1.9 ms This application note presents an implementation of the Flash 190 words 1,117 words following fixed-point math routines for the PIC16F RAM 11 bytes 40 bytes microcontroller families: • SIN(X), COS(X) CORDIC THEORY ATAN(X) The CORDIC transform is based on the idea that all the CORDIC is an acronym for COordinate Rotation DIgital trigonometric functions can be calculated using vector Computer and was first developed by Jack Volder in rotations. Equation 1 shows how to do vector rotations. 1959. The CORDIC transforms are a collection of Its derivation is presented in Appendix B. iterative, shift-add algorithms used to compute a wide range of trigonometric and hyperbolic functions on a EQUATION 1: ROTATION OF VECTOR digital computer. (X, Y) BY ? With proper modification, these routines can also be -1 -1 xx= cos? – ysin?, cos , polar/rectangularused to implement the sin yy= cos? + xsin? coordinate conversion, hyperbolic, and even multiply/ divide functions. More detail on these modifications can Figure 1 shows an example of Equation 1 by rotating a be found in a paper titled, 'A Survey of CORDIC vector (70, 19), by 30°. Algorithms for FPGA-Based Computers” by Ray Andraka. FIGURE 1: ROTATION OF VECTOR The structure of the CORDIC transform lends itself to (70,19) BY 30° hardware implementations. Typical applications of the CORDIC transform include FPGA-based applications. In fact, entire Arithmetic Logic Units have been imple- mented based on the CORDIC transform. However, the software-based CORDIC algorithm presented in this 51.4 application note will provide a sufficient performance improvement for most applications. 19 These fixed-point CORDIC math routines are consider- 45°ably faster than other more traditional methods based 15° on the Taylor expansion. This makes these routines 7051.1 ideal for real-time applications requiring very fast calcu- lations. The SINCOS function, which simultaneously x = (70)cos(30°) - (19)sin(30°) = 51.12 calculates the sine and cosine values of a given angle = (19)cos(30°) + (70)sin(30°) = 51.45y using the CORDIC transform, will typically take 370 µs to compute on a PIC16F microcontroller running at 20 MHz. This is in contrast to 1.9 ms using a sin(x) function The CORDIC transform gives an iterative method for Products & Services
Math calculation software is used to perform mathematical calculations. These programs provide general core calculations as well as graphical analysis that can be used in science, engineering and technology.
Learn more about Math Calculation Software
| Math Calculation Software Insights
Graphics software is used to produce video graphics and to edit and convert graphic files of different formats. These types of software include raster graphics, vector graphics, raster to vector conversion (R2V), and others.
Learn more about Graphics Software
Vector network analyzers (VNA) measure the complex transmission and reflection characteristics of two-port devices in the frequency domain.
Search by Specification |
Learn more about Vector Network Analyzers
Programmable logic devices (PLD) are designed with configurable logic and flip-flops linked together with programmable interconnect. PLDs provide specific functions, including device-to-device interfacing, data communication, signal processing, data display, timing and control operations, and almost every other function a system must perform.
Search by Specification |
Learn more about Programmable Logic Devices (PLD)
Electrical power generators, also known as alternators, transform mechanical energy into electrical energy. They can be used for backup or emergency power or as an alternator on board a vehicle. Generators can produce either AC or DC power and are typically powered by a fuel engine.
Search by Specification |
Learn more about Electrical Power Generators
| Electrical Power Generators Insights
Product Announcements
Topics of Interest
AN1061 Efficient Fixed-Point Trigonometry Using CORDIC Functions For PIC16F TABLE 1: SIN(x) FUNCTION CALL Author: Jose Benavides SPECIFICATIONS WITH Microchip Technology Inc. PIC16F877A AT 20 MHZ...
B.1 Coordinates
The position of a point particle in three-dimensional Euclidean space is given by the vector r( x, y, z) in Cartesian coordinates, where x, y, and z are measured in the x ~, y ~,...
Useful Integrals
Trigonometric Relations
sin( x y) = sin x cos y cos x sin y
cos( x y) = cos x cos y sin x sin y
2sin x sin y = cos( x - y) - cos( x + y)
2sin x cos y = cos( x + y) +...
In this section, we present several useful trigonometric identities used in communication system design.
e j ? = cos ( ?) j sin ( ?)
cos( A) = sin( A + 90 )
sin( A) = cos( A ? 90 )...
Appendix List
Appendix A: Mathematical Symbols
Appendix B: A Review of Some Elementary Trigonometry
Appendix C: Integrals
Appendix D: The Fourier Transform: The Different Conventions...
|
|