Embedded Systems

Introduction into embedded systems

what is embedded system and how it works

This post answers the question “What is embedded system and how it works”. An embedded system is a computer system without a user interface. A user interface can be indicated by buttons, a touchscreen sensor, remote controls etc. Embedded systems can be based on a microprocessor, microcontroller or FPGA.

An embedded system is usually designed to perform several tasks, and it can interact with its outer environment via sensors. Embedded computers (the heart of an embedded system) can be used in any high-tech product, due to its flexibility, and it can be programmed for different purposes. Embedded systems are required to provide a real-time response.

Real-time systems, have real-time constraints. Real-time systems can be classified as hard real-time systems, soft real-time systems and hybrid real-time systems. Embedded systems usually carry very reliable processes and are usually verified and tested several times in comparison to the conventional computers. Embedded systems are usually limited by the resources of the running process, like running power and memory.

The embedded system usually runs to scale down operating system RTOS (real-time operating system). The application number for embedded systems is countless. They already run a lot of home appliances, cell phones, cars, smart devices and others. Embedded systems are highly applicable in industrial applications. Often embedded chips are programmed by the CPU’s (Central Processing Unit) machine code. Often embedded systems are also programmed by higher level languages like Embedded Java or Linux OS and others. The last ones are more applicable for system on chip (SoC) designs because they are fast enough or tolerant to time variations for real-time processes.

Effective programming of an embedded system requires good knowledge of programming language and also system architecture. As was mentioned above, embedded systems are often constructed on microprocessors or microcontrollers. So here we will talk about the basics of microprocessors. A microprocessor is a highly integrated device and CPU, which is integrated into a silicon chip, and contains lots of additional semiconductor components like diodes, transistors and others, which are needed to perform embedded processes. So again, microprocessors usually contains:

  • CPUs
  • I/O inputs
  • RAM
  • ROM
  • Timers
  • Serial interfaces
  • EEPROM
  • Analogue-to-digital converter

The microprocessor or embedded system programming is no easy thing. There are many obstacles in the way of embedded sysytems programming. But this will be discussed later.

Embedded system architecture – memory bus

The processor is connected to the RAM via the data bus. It is a set of wires connected to each other in parallel. It allows data to be sent from the processor to the memory and to read data from the memory at the same time. The processor also sends the address of the memory that has to be assigned to the memory module. It is important to use the data with the right address. 

The multiplexed bus

The data bus that can carry data and the address on the same wire is known as multiplexing division. It means that at the multiplexed memory, it takes two times as long to read and write memory. It is also a pretty expensive process. In contrary to the multiplexed bus, a demultiplexed bus carries the data on one set of wires, and the address on the other. It makes the processing of writing/reading faster and cheaper. 

CPU clocks in modern microprocessors move much faster than other clocks, synchronising all the rest of the processes in the microprocessor. I/O communications at the microprocessor usually happens through the I/O bus that is multiplexed. The I/O bus also moves slower than the CPU. The method of transferring information between internal storage and an external I/O device is called an I/O interface. The CPU is interfaced by special communication links. These links are used to resolve the differences between the CPU and peripheral, using special hardware components.

Transfer mode

The data that came to the CPU from the external device is usually stored in the memory. Data going from the CPU to the external device is going from the memory. So there is several ways to transfer data:

  • Programmable I/O;
  • Interrupted I/O;
  • Direct memory access (DMA).

Programmable data transferring is achieved via the special instructions written in the computer program. When data transferring from the memory or CPU register, the CPU constantly monitors the peripheral devices. This is not the most optimum method of data transfer. Another method would be to interrupt the I/O method. It involves interrupting the facility and the special commands that initiate the interrupting signal when data is available from any device.

In this case the CPU can proceed on any other program. And again, when the data transfer is ready from any device, the interface sends the signal to interrupt to the computer, the CPU stops performing the task and starts the data transfer. After data transfer is finished, the CPU continues performing the interrupted task.

The third method of data transfer is DMA. The speed of the data transfer is limited by the CPU speed. For this purpose the peripheral devices can communicate directly between each other, avoiding the CPU interruption, and using memory buses. This method is called direct memory access. The CPU is not controlling the data transfer between the memory unit and peripherals. There is a DMA controller for this purpose, which controls all the interaction between the memory unit and I/O devices.

As was mentioned above a microprocessor contains a programmable controller, programmable I/O and programmable timers, among other semiconductor chips on the board. Programmable timers are very useful for performing different operations. After the trigger is switched, another operation can start. Timers are also used as a real-time clock (RTC), that monitors and tracks time of human activity. RTCs are usually equipped with a battery when the embedded device is plugged into the power, and it cannot be stopped by switching the power off. All modern microprocessors contains the internal RTC chip on board.  RTCs are also useful when a system has to do some periodic operation.

Big variety of embedded systems can be found at Digi-Key Electronics catalogue.

Information processing

Tags:

Leave a Reply