As its name suggests, an embedded system is a microprocessor- or microcontroller-based system, which is designed for a specific function and embedded into a larger mechanical or electrical system. Since embedded systems are developed for some specific task rather than to be a general-purpose system for multiple tasks, they are typically of limited size, low power, and low cost. Embedded systems are widely used in various purposes, such as commercial, industrial, and military applications.
Typically, an embedded system consists of hardware and application software components. Some embedded systems have real-time operating system (RTOS). Some small embedded systems may not have RTOS. Therefore, an embedded system can be defined as a microprocessor- or microcontroller-based, software driven, reliable, and real-time control system. Figure 2.12 shows an embedded system on a plug-in card with multiple components such as processor, memory, power supply, and external interfaces.
Embedded System Hardware
An embedded system contains a microprocessor or microcontroller that is typically designed to perform computation for real-time operations. Generally, a microprocessor is only a central processing unit (CPU). Hence, other components (for example, memories, communication interfaces) need to be integrated and work with the microprocessor as a whole system. In contrast, a microcontroller is a self-contained system, which includes a CPU, memories (e.g., RAM, flash memory), and peripherals (e.g., serial communication ports).
Embedded System Software
Microprocessors or microcontrollers used in embedded systems are generally not as advanced when compared to general-purpose processors designed for managing multiple tasks. They often work on a simple, less-memory-intensive program environment . As a result, embedded system software has specific hardware requirements and capabilities. It is tailored to the particular hardware and has time and memory constraints . Programs and operating systems are generally stored in flash memory within embedded systems.
printf(“Hello C Language”);
#include <stdio.h> includes the standard input output library functions. The printf() function is defined in stdio.h .
int main() The main() function is the entry point of every program in c language.
printf() The printf() function is used to print data on the console.
return 0 The return 0 statement, returns execution status to the OS. The 0 value is used for successful execution and 1 for unsuccessful execution