EmbeddedRelated.com
Tutorials

Endianness and Serial Communication

Stephen Friederichs May 20, 20131 comment

Endianness is a consideration that is easily overlooked in the design of embedded systems. I myself am amply guilty of this oversight. It’s something you don’t ever have to worry about if you’re only working with a single processor or two processors that have the same endianness.  You can even avoid it if you have two processors that have different endianness but never transmit data between themselves that consists of more than one byte.  It’s easy to lull...


C Programming Techniques: Function Call Inlining

Fabien Le Mentec April 29, 20137 comments
Introduction

Abstraction is a key to manage software systems as they increase in size and complexity. As shown in a previous post, abstraction requires a developper to clearly define a software interface for both data and functions, and eventually hide the underlying implementation.When using the C language, the interface is often exposed in a header '.h' file, while the implementation is put in one or more  corresponding '.c' files.

First, separating an interface from its...


Debugging with Heartbeat LEDs

Stephen Friederichs April 1, 2013

In this article I’ll discuss one of the most basic debugging tools in an embedded system: the heartbeat LED.  Picture this: you’re developing your first program for a new microcontroller. You’ve written the code, configured the programmer, downloaded the HEX file and now... what Your program is running - isn’t it?

Truth is that it’s hard to tell with most embedded software.  Compared to desktop or even server applications embedded software tend not to have very many...


Layout recomendations and tips for best performance against EMC

Dr. Maykel Alonso January 4, 2013

When making the layout of the circuit diagram, it is interesting to perform a preliminary analysis of several issues in order to minimize problems arising from electromagnetic compatibility.The analysis consists in:

Identify / Analyze components: This section will analyze the integrated components, as well as any recommendations it may have the manufacturer. We must also analyze the encapsulation possibilities which have the component.


LCD Control with an MCU

Dr Cagri Tanriover November 17, 20129 comments

 Controlling a liquid crystal display (LCD) to indicate a few ASCII characters should not be a big challenge as a project. That’s exactly what I thought when I decided to include a 2 line by 16 character display in my current project. My initial thought was. “How difficult could it be with all the resources on the internet and my embedded development expertise primarily in telecoms?” Let me tell you it is not as straightforward as I thought it would be and therefore I...


How to Build a Fixed-Point PI Controller That Just Works: Part II

Jason Sachs March 24, 20122 comments

In Part I we talked about some of the issues around discrete-time proportional-integral (PI) controllers:

  • various forms and whether to use the canonical form for z-transforms (don't do it!)
  • order of operation in the integral term: whether to scale and then integrate (my recommendation), or integrate and then scale.
  • saturation and anti-windup

In this part we'll talk about the issues surrounding fixed-point implementations of PI controllers. First let's recap the conceptual structure...


How to Build a Fixed-Point PI Controller That Just Works: Part I

Jason Sachs February 26, 20127 comments

This two-part article explains five tips to make a fixed-point PI controller work well. I am not going to talk about loop tuning -- there are hundreds of articles and books about that; any control-systems course will go over loop tuning enough to help you understand the fundamentals. There will always be some differences for each system you have to control, but the goals are the same: drive the average error to zero, keep the system stable, and maximize performance (keep overshoot and delay...


Embedded Software Creation II - European Normative & Legislation

Dr. Maykel Alonso December 20, 20116 comments

In this post I will explain the European Normative. I will answer the main questions and I will be open to answer all the doubts any of you could have. Please leave a comment and I will answer if i could.

Why I need to look and accomplish some standards? 

The main reason is if you want to comercialize the product in the European Union, if exists any European Directive that cover the product, the product must be marked with the CE mark. For USA it work in the same way by the...


C++ on microcontrollers 4 – input pins, and decoding a rotary switch

Wouter van Ooijen November 12, 20112 comments

previous parts: 1, 2, 3

 This blog series is about the use of C++ for modern microcontrollers. My plan is to show the gradual development of a basic I/O library. I will introduce the object-oriented C++ features that are used step by step, to provide a gentle yet practical introduction into C++ for C programmers.  Reader input is very much appreciated, you might even steer me in the direction you find most interesting.

So far I...


C++ on microcontrollers 3 – a first shot at an hc595 class with 8 output pins

Wouter van Ooijen November 2, 2011

 previous parts: 1, 2

This blog series is about the use of C++ for modern microcontrollers. My plan is to show the gradual development of a basic I/O library. I will introduce the object-oriented C++ features that are used step by step, to provide a gentle yet practical introduction into C++ for C programmers.  Reader input is very much appreciated, you might even steer me in the direction you find most interesting.

In the first part of...


Good old multiplexed keypad in an embedded system

Jayaraman Kiruthi Vasan April 17, 20118 comments

Good old multiplexed keypad in embedded systems

(My www.embeddedrelated.com Blog No.1)

Touch-screens, rotary encoder switches and other navigational aids rule the user interface these days.  Navigation through menus and sub-menus is child’s play as icons and thumbnails rule the screen.

 

Jumping from one screen to another, switching between programs and event notification pop-ups are made possible due to high...


Designing Embedded System with FPGA - 1

Pragnesh Patel October 28, 200711 comments

With the introduction of soft processors and related tools (like EDK from Xilinx), implementation of basic embedded system in FPGA is made easy. This requires very little or almost no knowledge of VHDL programming. Actually that’s how I started. If user is interested in taking full advantage of FPGA and its parallel processing power, then yes, detail understanding of soft processor, its peripheral bus and VHDL programming is required.

 

I will start with...


Coding Step 4 - Design

Stephen Friederichs November 24, 2015

Articles in this series:

The last article in this series discussed how to write functional high-level requirements: specifications for what your software is supposed to do. Software design is the other side of the coin....


Getting Started With Zephyr: West Manifest Customization

Mohammed Billoo April 4, 2023
Introduction

The Zephyr Project RTOS (https://zephyrproject.org/), or simply “Zephyr” as it is known colloquially, is an increasingly popular real-time operating system due to its native support for over 450 boards and countless peripherals. When starting with any embedded software project, the first task is to start from a known baseline. This can include cloning a repository from source control, which can be the case with embedded Linux, or downloading a zip file representing a...


Finite State Machines (FSM) in Embedded Systems (Part 1) - There's a State in This Machine!

Massimiliano Pagani February 5, 20243 comments

An introduction to state machines and their implementation. Working from an intuitive definition of the state machine concept, we will start with a straightforward implementation then we evolve it into a more robust and engineered solution.


Deeply embedded design example - Logic replacement

Gene Breniman July 9, 2011

I have always believed that some of the low-cost, low-pin count, low-resource microprocessors would make an excellent choice for the replacement of discrete logic components.  In these cases the deeply embedded microprocessor would become less of a general purpose computer and more of a logic replacement, providing a prescribed function with no connection to the outside world.  In a world of bigger, faster and more expensive, it is a pleasant change of pace...


C++ on microcontrollers 3 – a first shot at an hc595 class with 8 output pins

Wouter van Ooijen November 2, 2011

 previous parts: 1, 2

This blog series is about the use of C++ for modern microcontrollers. My plan is to show the gradual development of a basic I/O library. I will introduce the object-oriented C++ features that are used step by step, to provide a gentle yet practical introduction into C++ for C programmers.  Reader input is very much appreciated, you might even steer me in the direction you find most interesting.

In the first part of...


Getting Started With Zephyr: Devicetrees

Mohammed Billoo July 18, 20232 comments

This blog post provides an introduction to the "Devicetree", another unique concept in The Zephyr Project. We learn about the basic syntax of a device tree and how its structure and hierarchy mirror hardware, from the SoC to the final board. We also see how hardware described in a devicetree can be referenced and controlled in the source code of a Zephyr-based application.


Designing Embedded Systems with FPGA-2

Pragnesh Patel November 13, 200710 comments

In last part, we created hardware design of basic system. The next step is to generate (compile) hardware design. Compiled hardware design is known as bit-stream andstored in *.bit file. To compile hardware, use hardware->generate hardware tab. The complete hardware design generation takes several seconds to several minutes depending on computer speed and design complexity. In back ground, the whole design process involves many different steps including synthesis, placement, routing and...


An Introduction to Embedded Development

Peter Johansson June 14, 20133 comments
This blog is a series to provide an introduction to embedded development for the aspiring embedded developer. No prior embedded development experience will be assumed, but you should have a reasonable understanding of the C language and knowledge of basic electronics. It will focus on the TI MSP430, but present topics in a generic way that can be easily translated to other processors. Welcome!

Hello, and welcome to my blog! This blog will be somewhat different from most...