## Debugging with Heartbeat LEDs

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

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

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

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

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

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

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

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...

## C++ on microcontrollers 2 - LPCXpresso, LPC-link, Code Sourcery, lpc21isp, linkerscript, LPC1114 startup

previous parts: 1

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.

I teach my students that...

## Using XML to describe embedded devices (and speak to them)

October 12, 20111 comment

This article discusses one of the typical development cycles in embedded device and communication design and presents a possible, light weight solution using the free DClib/netpp framework.

The challenge

Assume we're faced with the design of an embedded device, be it a simple SoC unit or a more complex, uC controlled engine with various attached peripherals. From first prototype to the market, the following development cycle is typically walked through:

## Best Firmware Architecture Attributes

Architecture of a firmware (FW) in a way defines the life-cycle of your product. Often companies start with a simple-version of a product as a response to the time-to-market caveat of the business, make some cash out of the product with a simple feature set. It takes only less than 2-3 years to reach a point where the company needs to develop multiple products derived from the same code base and multiple teams need to develop...

October 16, 2013
Arduino Robotics

Beginner robotics is a series of article chronicling my first autonomous robot build, Clusterbot.  This build is meant to be affordable, relatively easy and instructive.  The total cost of the build is around $50. 1. Arduino robotics - motor control2. Arduino robotics - chassis, locomotion and power3. Arduino robotics - wiring, coding and a test run4. ## Practical CRCs for Embedded Systems October 20, 20157 comments CRCs are a very practical tool for embedded systems: you're likely to need to use one as part of a communications protocol or to verify the integrity of a program image before writing it to flash. But CRCs can be difficult to understand and tricky to implement. The first time I attempted to write CRC code from scratch I failed once. Then twice. Then three times. Eventually I gave up and used an existing library. I consider myself intelligent: I got A's... ## C++ on microcontrollers 4 – input pins, and decoding a rotary switch 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... ## Arduino robotics #3 - wiring, coding and a test run October 17, 2013 Arduino Robotics Arduino robotics is a series of article chronicling my first autonomous robot build, Clusterbot. This build is meant to be affordable, relatively easy and instructive. The total cost of the build is around$50.

1. Arduino robotics - motor control2. Arduino robotics - chassis, locomotion and power3. Arduino robotics - wiring, coding and a test run4.

## Good old multiplexed keypad in an embedded system

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

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.

## Coding Step 3 - High-Level Requirements

Articles in this series:

If this series of articles has been light on one thing it's 'coding'. If it's been light on two things the second is 'embedded'. In three articles I haven't gotten past Hello World on a desktop PC. That changes (slowly) with this article. In this article I'll...

## Debugging with Heartbeat LEDs

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...

## Coding Step 4 - Design

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....