• An embedded system is an application that contains at least
one programmable computer (typically in the form of a microcontroller, a microprocessor or digital signal processor chip) and which is used by individuals who are, in the main, unaware that the system is computer-based. Typical examples of embedded applications
• Mobile phone systems (including both customer handsets
washing machines, microwave ovens, video recorders, security systems). Typical examples of embedded applications
• Aerospace applications (including flight control systems,
engine controllers, autopilots and passenger in-flight entertainment systems).
• Medical equipment (including anaesthesia monitoring
systems, ECG monitors, drug delivery systems and MRI scanners). • Defence systems (including radar systems, fighter aircraft flight control systems, radio systems and missile guidance systems). INTRODUCTION • Some important decisions must be made at the start of any embedded project:
• The choice of processor.
• The choice of programming language. • The choice of operating system. Which programming language should you use? • Key decision that needs to be made is the choice of programming language. • To identify a suitable language for embedded systems , the following observations must be made: • Computers (such as microcontroller, microprocessor or DSP chips) only accept instructions in ‘machine code’ (‘object code’). • Interpretation of the code by the programmer is difficult and error prone. • All software, whether in assembly, C, C++, or Java must ultimately be translated into machine code in order to be executed by the computer. • Poor translator generate poor executable code.
• Embedded processors – like the 8051 – have limited
processor power and very limited memory available: the language used must be efficient.
• Need low-level access to the hardware.
• The language chosen should be in common use.
• All we can really say is that we require a language that is
efficient, high-level, gives low-level access to hardware, and is well defined.
• Against all of these points, C scores well.
C’s features as follows: • It is ‘mid-level’, with ‘high-level’ features (such as support for functions and modules), and ‘low-level’ features (such as good access to hardware via pointers).
• It is very efficient.
• It is popular and well understood.
• Even desktop developers who have used only Java or C++ can soon understand C syntax.
• Good, well-proven compilers are available.
• Overall, C’s strengths for embedded system development
Programing in Embedded C • The simplest architecture in an embedded system is typically a form of ‘Super Loop’ • When power is applied to the system.
• The function main() will be called: having
performed the initializations,
• The function X() will be called, repeatedly, until the