What is Embedded System? Why RUST for Embedded ??

Reading Time: 4 minutes
Embedded System

What is an Embedded System ???

An embedded system is a microcontroller or microprocessor based computer system that used to perform certain specific operations or tasks.
It can also be call as a computer hardware system which do have software embedded in it.


The Embedded System

Hardware is known as the core of the Embedded System.
Embedded systems are managed by micro-controllers where the micro-controller is the CPU that process the whole functioning.

Bus controller is the communication device that used to make communication possible between the components inside the embedded system.

Embedded systems programming instructions are stored in read only memory or flash.

Embedded system connect with outside world through interfaces like input/output devices.

Input devices which take Analog or Digital data as input from outside world using devices like sensors, switches etc.

Output devices provide the results after process the data.Some output devices are LCD, Touch screen, LED, Motors.


Micro-controller

It is considered as a small computer or semi-computer which is used to perform some specific task of an embedded system.It is present on a single metal-oxide-semiconductor integrated circuit chip.

STM32F303VCT6 DISCOVERY Board an example of micro controller.


How an embedded system works ??

Embedded system working

Steps shows how this system works

  • The system takes the input from the outside world in analog or digital format using devices like sensor touch screens or switches.
  • And then it processes the taken input by doing calculations or conversions for example converting analog data to digital data.
  • The third step is to throw the output therefore after processing the input the system provides the output through output devices like LCD, motor, or touch screen.

Example of Embedded Systems from your daily life

daily life usage of embedded system


If you look around yourself you are all around with embedded systems small or big like washing machine microwave or dishwashers.
Modern cars commonly consist of many small computers or embedded systems, designed to perform different tasks within the vehicle.
Mobile phones. These consist of many embedded systems, including GUI software and hardware, operating systems (OSes), cameras, microphones, and USB.


The system consists of three components:

  1. Hardware include Processor, Memory, Input devices, Output devices, and Bus controllers
  2. Application software
  3. (RTOS) Real-Time Operating System (used to supervise the application software) in simple words it monitors the working of the application

Basic Structure of Embedded System

Structure of embedded system


Sensor
It is a device that measures the physical quantity and converts that into an electrical signal that can be read by an electronic instrument like an a2d convertor

A-D Converter
Here this takes an analog signal and converts them into digital. So work as analog to digital converter

D-A Converter
It basically converts the digital data taken by the processor into analog data

Processor
The processor is the heart of an embedded system that takes input and after the process, it converts it into output and then stores that into memory

Actuators
Actuators basically compare the output given by the D-A converter to the actual output stores and then stores the approved output


Why RUST For Embedded ??

rust embedded


What is RUST? Many of you may know but most of you still don’t !!
Rust is a programming language but not like other languages like java python etc.

The difference is rust is a system programming language, not an application whose syntax is much similar to c++ but guarantees more safety than this.


Reasons to use RUST language for Embedded System

  1. The most important reason is safety as it is hard to accidentally introduce memory safety bugs while writing is rust.it makes developers think before writing. Reading an uninitialized memory requires an explicit unsafe block and if you are sure and still use that by going against the compiler you need to create a wrapper around your code to make it safe.
  2. It provides traits as in embedded system traits can describe which CPU pins can be configured as pulse width modulation (PWM) and allow you to configure them.
  3. Type generic feature is another nice feature of RUST. They are a means to tell Rust that a function can take anything it likes, just as long as the type implements certain traits.
  4. Last but not least Rust is backed by a great community that is ready to help you anytime.

If you want to read more content like this?  Subscribe to Rust Times Newsletter and receive insights and latest updates, bi-weekly, straight into your inbox. Subscribe to Rust Times Newsletter: https://bit.ly/2Vdlld7.

Written by 

Nitin is a Software Consultant, with experience of more than 7 months. He works on Rust Programming Language and Embedded Development using Rust. He is also fond of Java Programming & Artificial Intelligence. Apart from that, his hobbies are Watching Netflix, Reading, Singing & Writing.

2 thoughts on “What is Embedded System? Why RUST for Embedded ??5 min read

Comments are closed.