Digital PLL's -- Part 1

Neil Robertson June 7, 201620 comments
1. Introduction

Figure 1.1 is a block diagram of a digital PLL (DPLL).  The purpose of the DPLL is to lock the phase of a numerically controlled oscillator (NCO) to a reference signal.  The loop includes a phase detector to compute phase error and a loop filter to set loop dynamic performance.  The output of the loop filter controls the frequency and phase of the NCO, driving the phase error to zero.

One application of the DPLL is to recover the timing in a digital...

Best Firmware Architecture Attributes

Dr. Tayyar GUZEL June 4, 20166 comments

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

Choosing a Vehicle

Ed Nutter May 25, 20163 comments

There are a few things to take into consideration when choosing a vehicle or chassis for your autonomous vehicle. You can design and build your own, buy a stripped robot chassis, or use a radio controlled (RC) vehicle as a starting point. I usually use an RC vehicle as a starting point.

Two basic styles of RC vehicles exist. The first, is the toy-grade vehicle. It can be found in most retail stores, and usually costs below 50 dollars. Its main advantage is the low price, which can be as low...

A few uses for an autonomous vehicle

Ed Nutter May 21, 2016

From the time technology that we have come to know was invented, it has been used to gain an advantage militarily or to make life easier. Military usage seems to be a driving factor, but it is not the only factor.

Guerilla tactics played an even greater part in the US conflict in Iraq and Afghanistan. Using lessons learned fighting the Soviets in the 1980s and training from US backed anti-Soviet forces, the guerilla tactics did increasing damage to US military forces. Insurgents...

Stability or insanity

Tim Wescott May 17, 20161 comment

I've just spent over two weeks getting ready to do my next video.  It was a combination of one of those vast underestimations one occasionally makes, combined with falling into a bit of an obsession.

I am, at this point, not only wondering if it was worth it, but questioning my sanity in carrying on even when the going went beyond tough to just plain crazy.

At any rate, a good video needs a visual aid, and I decided that my video needed to demonstrate stability with a pendulum....

Modern Embedded Systems Programming: Beyond the RTOS

Miro Samek April 27, 20167 comments

An RTOS (Real-Time Operating System) is the most universally accepted way of designing and implementing embedded software. It is the most sought after component of any system that outgrows the venerable "superloop". But it is also the design strategy that implies a certain programming paradigm, which leads to particularly brittle designs that often work only by chance. I'm talking about sequential programming based on blocking.

Blocking occurs any time you wait explicitly in-line for...

Data Types for Control & DSP

Tim Wescott April 26, 20166 comments

There's a lot of information out there on what data types to use for digital signal processing, but there's also a lot of confusion, so the topic bears repeating.

I recently posted an entry on PID control. In that article I glossed over the data types used by showing "double" in all of my example code.  Numerically, this should work for most control problems, but it can be an extravagant use of processor resources.  There ought to be a better way to determine what precision you need...

PID Without a PhD

Tim Wescott April 26, 201611 comments

I both consult and teach in the area of digital control. Through both of these efforts, I have found that while there certainly are control problems that require all the expertise I can bring to bear, there are a great number of control problems that can be solved with the most basic knowledge of simple controllers, without resort to any formal control theory at all.

This article will tell you how to implement a simple controller in software and how to tune it without getting into heavy...

Scorchers, Part 1: Tools and Burn Rate

Jason Sachs April 12, 20166 comments

This is a short article about one aspect of purchasing, for engineers.

I had an engineering manager once — I’ll leave his real name out of it, but let’s call him Barney — who had a catchy response to the question “Can I buy XYZ?”, where XYZ was some piece of test equipment, like an oscilloscope or multimeter. Barney said, “Get what you need, need what you get.” We used purchase orders, which when I started in 1996 were these quaint forms on...

Embedded Firmware Refactoring, Optimisation and Migration

Ian Smith March 29, 2016

Legacy products are often based on older hardware platforms which often become under-powered or run out of memory which constrains further product development. Customers are always looking for new features and improved performance but often either don’t want to invest in new hardware or need to retain the current field population of devices.

These are ongoing challenges for any product manufacturer, but are particularly highlighted in embedded systems where product...

A wireless door monitor based on the BANO framework

Fabien Le Mentec June 10, 20145 comments

I have been thinking for a while about a system to monitor the states of my flat and my garage doors from a remote place. Functionnaly, I wanted to monitor the state of my doors from a remote place. A typical situation is when I leave for holidays, but it can also be useful from the work office. To do so, I would centralize the information on a server connected on the Internet that I could query using a web browser. The server itself would be located in the appartement, where...

Donald Knuth Is the Root of All Premature Optimization

Jason Sachs April 17, 20172 comments

This article is about something profound that a brilliant young professor at Stanford wrote nearly 45 years ago, and now we’re all stuck with it.


The idea, basically, is that even though optimization of computer software to execute faster is a noble goal, with tangible benefits, this costs time and effort up front, and therefore the decision to do so should not be made on whims and intuition, but instead should be made after some kind of analysis to show that it has net...

Interfacing LINUX with microcontrollers

Fabien Le Mentec May 7, 20132 comments

I am increasingly asked to work on small spare time projects where a user needs to control some device over the INTERNET. Recently, a friend needed to control heater relays and measure the temperature of its geographically distant secondary house. Another case relates to the control of a pan tilt home monitoring camera. A last one is the control of an old XY plotter DACs.

In both applications, the user wants to access the system over a web browser using HTTP. From the user...

Someday We’ll Find It, The Kelvin Connection

Jason Sachs July 28, 20142 comments

You’d think it wouldn’t be too hard to measure electrical resistance accurately. And it’s really not, at least according to you just follow these easy steps:

  • Choose the item whose resistance you wish to measure.
  • Plug the probes into the correct test sockets.
  • Turn on the multimeter.
  • Select the best testing range.
  • Touch the multimeter probes to the item you wish to measure.
  • Set the multimeter to a high voltage range after finishing the...

Ada 2012 Comes to ARM Cortex M3/M4

Mike Silva April 25, 20148 comments
Ada, that old dinosaur?  I thought Ada was dead!

Admit it, at least a few of you had that thought, right?  Well, far from being dead, the Ada language has been evolving, improving, and helping to save lives, property and money around the world for the past 30 years.  And what's more, the latest version of the language, Ada 2012, will soon be coming to a two-dollar microcontroller near you.

A Personal Dream Come True

OK, maybe that's going too far -...

Discrete-Time PLLs, Part 1: Basics

Reza Ameli December 1, 20159 comments

Design Files: Part1.slx

Hi everyone,

In this series of tutorials on discrete-time PLLs we will be focusing on Phase-Locked Loops that can be implemented in discrete-time signal proessors such as FPGAs, DSPs and of course, MATLAB.

In the first part of the series, we will be reviewing the basics of continuous-time baseband PLLs and we will see some useful mathematics that will give us insight into the inners working of PLLs. In the second part, we will focus on...

Recruiting New Bloggers!

Stephane Boucher October 16, 20157 comments

Previous calls for bloggers have been very successful in recruiting some great communicators - Rick LyonsJason Sachs, Victor Yurkovsky, Mike Silva, Markus NentwigGene BrenimanStephen Friederichs,

Introduction to Microcontrollers - Ada - 7 Segments and Catching Errors

Mike Silva September 22, 20145 comments

7 Segments the Ada Way

Here is the Ada version (I should say AN Ada version) of the 7 segment multiplexing code presented in the last installment.  The hardware now is the STM32F407 Discover board, which is a Cortex M4F board.  There are lots of differences in GPIO and timer setup, but if you understoold the previous code in C you should not have much trouble understanding this code in Ada.

As interesting as the Ada approach to the task is the Ada ability to detect...

Homebrew CPUs: Messing around with a J1

Victor Yurkovsky May 29, 2015

In this article I will examine James Bowman's excellent J1 CPU; I will then proceed to mess around with various parts of it, making it smaller, more appropriate to my particular application, and possibly faster.  I hope this will show you how easy it is to fiddle around with homemade CPUs and encourage you to make something weird and wonderful.


My hat is off to James Bowman.  J1 is pretty cool.  It is a stack machine; it executes instructions in one cycle, it is...

Elliptic Curve Cryptography

Mike November 16, 20156 comments

Secure online communications require encryption.  One standard is AES (Advanced Encryption Standard) from NIST.  But for this to work, both sides need the same key for encryption and decryption.  This is called Private Key encryption.  Public Key encryption is used to create a private key between two sides that have not previously communicated.  Compared to the history of encryption, Public Key methods are very recent having been started in the 1970's.  Elliptic...