Embedded C Basics

Embedded C Basics:

This Embedded C is extensive and contains many advanced concepts. The range of modules covers a full introduction to C, real-time and embedded systems concepts through to the design and implementation of real time embedded or standalone systems based on real-time operating systems and their device drivers. Real time Linux (RTLinux) is used as an example of such a system. The modules include an introduction to the development of Linux device drivers.

Predominantly intended to be taught to development teams at customer sites it is not expected that any one course would cover the full range of modules in a typical five day period. For teams without experience of C and high-end real time operating sytems it would typically require eight to ten days of intensive training to give full coverage to the topics included here. The course covers all of the important features of the C language as well as a good grounding in the principles and practices of real-time systems development including the POSIX threads (pthreads) specification.

The design of the modules is intended to provide an excellent working knowledge of the C language and its application to serious real time or embedded systems. Those wanting in-depth training specifically on RTLinux or Linux kernel internals should contact us to discuss their requirements; this set of modules is geared more towards providing the groundwork for approaching those domains rather than as in-depth training on a specific approach.

The Embedded C basics contains essential information for anyone developing embedded systems such as microcontrollers, real-time control systems, mobile device, PDAs and similar applications. This C course is based on many years experience of teaching C, extensive industrial programming experience and also participation in the ANSI X3J11 and BSI standards bodies that produced the standard for C. We focus on the needs of day-to-day users of the language with the emphasis being on practical use and delivery of reliable software.

High-level language programming has long been in use for embedded-systems development. However, assembly programming still prevails, particularly for digital-signal processor (DSP) based systems. DSPs are often programmed in assembly language by programmers who know the processor architecture inside out. The key motivation for this practice is performance, despite the disadvantages of assembly programming when compared to high-level language programming.

Performance is key to signal-processing applications because it directly translates into end-user features. A 10-percent lower clock speed generally results in a corresponding reduction in power consumption. With more effective code generation, an application needs less processing cycles and thus a lower clock speed, which results in less EMI, longer battery life, and less heat generation. If the video decoding takes 80 percent of the CPU-cycle budget instead of 90 percent, for instance, there are twice as many cycles available for audio processing. This coupling of performance to end-user features is characteristic of many of the real-time applications in which DSP processors are applied.

Embedded C is not part of the C language as such. Rather, it is a C language extension that is the subject of a technical report by the ISO working group named "Extensions for the Programming Language C to Support Embedded Processors" . It aims to provide portability and access to common performance-increasing features of processors used in the domain of DSP and embedded processing. The Embedded C specification for fixed-point, named address spaces, and named registers gives the programmer direct access to features in the target processor, thereby significantly improving the performance of applications. The hardware I/O extension is a portability feature of Embedded C. Its goal is to allow easy porting of device-driver code between systems.

A further specialization of the data path is the coupling of multiplication and addition to form a single cycle Multiply-ACcumulate unit (MAC). It is combined with special-purpose accumulator registers, which are separate from the general-purpose registers.

Data memory is segmented and placed close to the MAC to achieve the high bandwidths required to keep up with the streamlined data path. Limits are often placed on the extent of memory-addressing operations. The localization of resources in the data path saves many data movements that typically take place in a Load-Store architecture.

Current state-of-the-art embedded applications (mobile phones, for example) are implemented using two processors. One processor is a low-power RISC processor that takes care of all control processing, user interaction, and display management. It is programmed in a high-level language using an SDK that includes a compiler. The other processor is a DSP, which takes care of all of the signal processing. The signal-processing algorithms are typically hand-coded in assembly.

 

Comments

hi

wat r the features of embedded c for 89c51 microcontroller

 

From the Web

Suggestions: (1)
Loading...

See few results | more results

Search: [Press Enter]

Share |