Hello! Welcome to Embedic!
This website uses cookies. By using this site, you consent to the use of cookies. For more information, please take a look at our Privacy Policy.
Home > Embedded Events > Embedded Programming for the Internet of Things

Embedded Programming for the Internet of Things

Date: 15-09-2021 ClickCount: 450

Embedded programming has a long history of enabling devices to meet people's needs. However, it is still largely overshadowed by application programming. While application programmers use relatively advanced object-oriented languages such as C ++ or Java or graphical application development environments such as MATLAB, embedded programmers are still programming in C. They were always outclassed by application programmers. Today, even hobbyists can use simple languages to develop applications and share them with the world, whereas embedded programmers need a deep understanding of hardware and firmware, and how to write programs that can be executed in environments where resources are often limited. With the advent of the Internet of Things (IoT), the balance can finally change. Now that many new thermostats, toasters, watches and light bulbs are equipped with processors and connectivity, the market needs more embedded programmers to program these devices and simpler tools to enable these programmers to write code without getting bogged down in low-level hardware.

embedded programming

What is embedded programming?

 

Techopedia defines embedded programming as "a specific type of programming that supports the creation of consumer-oriented or enterprise-oriented devices that do not run on traditional operating systems like full-size laptops and mobile devices." The concept of embedded programming is part of what is driving the development of digital appliances and devices in today's IT market.

 

Simply put, embedded programming is the design and writing of programs for small computers that are embedded in devices other than traditional PCs, laptops or smartphones. It enables microcontrollers to wake up previously dumb devices such as thermostats, lighting systems, parking devices, etc.

 

Embedded Programming and the Internet of Things

 

From an engineering perspective, the IoT describes a network of embedded devices controlled by microprocessors that are directly or indirectly connected to the Web. thus, the three pillars of the IoT are

  • Embedded programming
  • Web technologies
  • Information Technology

The Internet of Things will soon be everywhere. As a result, embedded devices will soon be ubiquitous as well.

 

A brief overview of some of the ways in which the IoT is changing industries.

 

1) Industrial: industrial machinery and controls, temperature monitoring and anomaly detection.

 

2) Healthcare: blood pressure monitors, heart rate monitors, fitness trackers, embedded drug delivery.

 

3) Aerospace and Defense: Flight control systems, drives, air and thermal management, engine power monitoring and control.

 

4) Smart home: home security systems, cameras, TVs and kitchen appliances.

 

Deeper into embedded systems

 

It has been said that every complex system in the world can be reduced to two conceptual areas: software and hardware. Embedded systems more or less represent the intersection of these domains: hardware and software.

 

Exploring Embedded Hardware

 

A typical embedded development board is divided into five modules: processor, memory, input devices, output devices, and bus controllers.

 

Hardware components of an embedded system

 

1) Processors

 

Embedded processors can be divided into two categories: common microprocessors use separate integrated circuits for memory and peripherals; microcontrollers use on-chip peripherals, reducing power consumption, size and cost. Some examples of these include

  • Microcontroller (CPU): an intelligent device used to compute user-assigned tasks and build small applications with precise calculations.
  • System on Chip (SoC): Includes the CPU, peripherals (timers, counters, etc.), communication interfaces (I²C, SPI, UART), and power management circuitry on a single integrated circuit.
  • ASIC processor (Application Specific Integrated Circuit): Designed by a company or manufacturer for a specific application.
  • DSP processor: Eliminates noise and improves signal quality for audio and video applications.

 

2) Memory

 

Memory is used to store the data being used on the device. Some examples of memory types used in embedded systems include non-volatile RAM (random access memory), volatile RAM, DRAM (dynamic random access memory), etc.

 

(3) Input devices

 

Input devices (e.g. sensors, switches, photodiodes, optocouplers, etc.) capture data from the outside world to be processed or exported from the device.

 

4) Output devices

 

Output devices, including LCD (Liquid Crystal Display) or LED (Light Emitting Diode) displays, seven-segment displays, buzzers and relays, respond to input events from outside the microcontroller.

 

5) Bus Controller

 

A bus controller is a communication device that transfers data between components within an embedded system. The most widely used bus controllers are serial bus (I2C, SPI, SMBus, etc.), RS232, RS485, and Universal Serial Bus (USB).

 

Exploring Embedded Software

 

Embedded software (sometimes called firmware) is written for device drivers, operating systems and applications, as well as error handling and debugging.

 

Software components of an embedded system

 

1) Device Drivers

 

A device driver is a piece of embedded code written for a specific piece of hardware.

 

2) Operating System (OS) or MicroOS

 

Embedded systems have a range of operating systems, including real-time operating systems (RTOS), mobile embedded, stand-alone and network embedded systems.

 

Nowadays, most embedded software is written in two languages: C and C++. As far as syntax is concerned, there is not much difference between C and C++. However, C++ has some additional features, such as enhanced security and tightness to real-world applications, while C is considered more reliable and has better performance by interacting directly with hardware.

 

Key considerations when creating embedded products

 

The best way to start writing software that directly affects physical objects is to explore embedded platforms such as Arduino, Raspberry Pi or Particle.

 

To develop a viable product, you should take the following steps.

 

Step 1. Learn C or C++

 

This is where many people stop learning, as these languages can be difficult to learn. However, if you want to write embedded software, you must learn C/C++ (and possibly eventually Rust).

 

Step 2. Learn some basic electronics

 

Understand at least voltage, current, power, resistance, and Ohm's Law.

 

Step 3. Get basic devices

 

Embedded programmers interact with the physical world, so tools such as soldering irons, digital multimeters (DMMs) and hardware debuggers/JTAG adapters (such as ST-Link or OLMEX adapters) or logic analyzers will help.

 

Step 4. Select a microcontroller and tool chain

 

To make the program run, you need a microcontroller to actually run it, a compiler to compile the code for that microcontroller, and other tools to load the program onto your hardware. An example of a microcontroller combined with a toolchain is the STM32 microcontroller supported by arm-gcc and the openOCD toolchain.

 

Step 5. Understanding Datasheets

 

Before actually sitting down to write the first lines of code, you need to understand the (end-user) specification.

 

Step 6. Examine the components

 

Analyze and select the components (software and hardware) needed to build the product.

 

Step 7. Design the product

 

Design is always the most critical phase of any development cycle. The peculiarity of embedded programming is that you have to develop the hardware and software parts separately and then integrate them.

 

Step 8. Develop the prototype

 

A prototype is an example version designed to test a concept developed according to a specification using selected hardware and software tools.

 

Step 9: Test the application

 

Once the prototype is available, test cases can be run to explore the potential of the application.

 

Step 10: Deploy the application

 

After testing the application, the results are checked in a real environment for proof of concept (a technique used to validate ideas).

 

Step 11: Support and Upgrade

 

If needed, you should be ready to provide support and upgrade the application with new features.

 

Now you are ready to start changing the world!

  • Introduction to the Zynq-7000 Gigabit Ethernet Controller
  • How does an embedded computer work? What applications are available?

Hot Products

  • PIC16C710-04/P

    Manufacturer: Microchip

    IC MCU 8BIT 896B OTP 18DIP

    Product Categories: 8bit MCU

    Lifecycle:

    RoHS:

  • TMS320C6747BZKB3

    Manufacturer: Texas Instruments

    IC DSP FLOATING POINT 256BGA

    Product Categories: DSP

    Lifecycle:

    RoHS:

  • PIC18F46K42-E/PT

    Manufacturer: Microchip

    IC MCU 8BIT 64KB FLASH 44TQFP

    Product Categories: 8bit MCU

    Lifecycle:

    RoHS:

  • TMS320C6472EZTZA6

    Manufacturer: Texas Instruments

    IC DSP FIXED-POINT 737FCBGA

    Product Categories: DSP

    Lifecycle:

    RoHS:

Customer Comments

  • Looking forward to your comment

  • Comment

    Verification Code * 

Compare products

Compare Empty