1233 views|0 replies

1140

Posts

0

Resources
The OP
 

Basic points of DSP C language [Copy link]

Until I came into contact with DSP, I had a further understanding of structures, unions, etc., and a deeper understanding of the use of an engineering variable because of the use of TI's library file routines. Here are some suggestions for beginners of DSP C:
1. Positioning and configuring DSP programs - CMD files, which requires familiarity with the memory structure of DSP. This part is easy for novices who have more contact with hardware. In fact, it is just a part of configuring a general C language compiler, such as the header file of AVR microcontrollers, cpu selection, etc., which is completed in DSP. In addition, you should also pay attention to the processing of encryption bits and watchdogs in TI routines.

2. Of course, there are some basics of C language: operators, priorities, and several basic flow control statements. These are the same no matter what C platform is running, the basics of the basics. However, it is also easy to lead to some very depressing results because of these simple basic problems. It is also because the depth of understanding of these basic concepts affects your software thinking.

3. The use of structures, unions, and bit fields, it is best to have a comparison to understand the occasions and advantages and disadvantages of application. With these basics, it is easy to understand some basic structures of TI routines.

4. The scope and life span of variables, so that we can transition from the initial single C file to the C project, and better understand the basic elements of modular programming and implement the foundation.

5. The application of Q format, because most DSPs are fixed-point, and floating-point numbers are often unavoidable in computing and processing. Using Q format can better play the high-speed characteristics of DSP. So some people say that "DSP programmers who can't use Q format are not good programmers"!

6. In addition, I think if you use DSP to participate in control, it is best to be familiar with some object-oriented programming languages, such as C++. You must be able to understand how to implement object-oriented programming in C. Why? First, object-oriented I personally think that modularization is better in writing programs, especially in the field of control. I have seen some masters' PLC programs also use object-oriented ideas to build modules. Since then, my single-chip computer programs have begun to move closer to this, and I have indeed found some benefits. For example, for those resources that need to be operated many times in the C process, sometimes there will be some common operation position errors. Second, there are many places in TI's routines that use these ideas. You must understand these things so that you can understand those routines more easily. For this part, I recommend a book "DSP C2000 Advanced Programmer".

7. Data structure knowledge. DSP must involve some good data structures to perform calculations. Only in this way can the algorithm be optimized better.

8. The use of matlab. Matlab provides powerful mathematical computing capabilities and can also simulate DSP combined with CCS. It can free programmers from tedious low-level programming. I personally feel that matlab provides a connection and a platform for programming ideas and low-level programs.

This post is from DSP and ARM Processors
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list