NXP LPC17xx/40xx: Decoding the Part ID

Ricky Bennett August 25, 20161 comment

This is the first blog of a number dealing with the NXP LPC17xx/40xx processor families and how to program them despite the lack of documentation.  The next blog will deal with implementing the LPC17xx/40xx UART with interrupts properly, and a subsequent blog will show how to use the UART in RS485 Normal Multidrop Mode (NMM) with Auto Address Detection (AAD).

My company has decided on using the NXP LPC17xx/40xx processor line for all our embedded projects.  Since...

Basic Sensors for an Autonomous Vehicle

Ed Nutter March 28, 2016

The following are a few basic sensors that can be used to help an autonomous vehicle navigate its environment.

The faster the vehicle is traveling, the faster the sensor must be processed.  

Moving vehicles could knock something over or cause damage to a person or object if it collides with them.

Drop-off and line sensors function better when mounted to the front of the vehicle.

Drop-off and collision sensors should be mounted front and rear, if your vehicle can back up.

Cortex-M Exception Handling (Part 2)

Ivan Cibrario Bertolotti February 1, 20169 comments

The first part of this article described the conditions for an exception request to be accepted by a Cortex-M processor, mainly concerning the relationship of its priority with respect to the current execution priority. This part will describe instead what happens after an exception request is accepted and becomes active.


Before discussing in detail the sequence of actions that occurs within the processor after an exception request...

Cortex-M Exception Handling (Part 1)

Ivan Cibrario Bertolotti November 28, 20152 comments

This article describes how Cortex-M processors handle interrupts and, more generally, exceptions, a concept that plays a central role in the design and implementation of most embedded systems. The main reason of discussing this topic in detail is that, in the past few years, the degree of sophistication (and complexity) of microcontrollers in handling interrupts steadily increased, bringing them on a par with general-purpose processors.

Coding Step 4 - Design

Stephen Friederichs November 25, 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....

Motion Sensor with Raspberry Pi and MPU6050 - Part 1

Shres L November 21, 2015

This blog will help you build your own, low cost 3-axis motion sensor using Raspberry Pi and Invensense MPU6050. For the benefit of the beginners, I will be beginning with the basics - setting up Raspberry Pi in part 1 of this blog series and then proceed to interfacing the MEMS based tri-axial motion sensing unit - MPU6050 to Raspberry Pi board in part 2. The final part no. 3 will be about acquiring data on the client computer. I have  tried multiple...

Practical CRCs for Embedded Systems

Stephen Friederichs October 21, 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...

How to Read a Power MOSFET Datasheet

Jason Sachs September 15, 20158 comments

One of my pet peeves is when my fellow engineers misinterpret component datasheets. This happened a few times recently in separate instances, all involving power MOSFETs. So it’s time for me to get on my soapbox. Listen up!

I was going to post an article on how to read component datasheets in general. But MOSFETs are a good place to start, and are a little more specific. I’m not the first person to write something about how to read datasheets; here are some other good...

Coding Step 3 - High-Level Requirements

Stephen Friederichs August 18, 20152 comments

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

Coding Step 2 - Source Control

Articles in this series:

When I first started out in programming, version control was not an introductory topic. Not in the least because it required a 'server' (ie, a computer which a teenaged me couldn't afford) but because it seemed difficult and only useful to teams rather than...

Introduction to Microcontrollers - Beginnings

Mike Silva August 20, 201311 comments

Welcome to this Introduction to Microcontroller Programming tutorial series. If you are looking to learn the basics of embedded programming for microcontrollers (and a bit of embedded hardware design as well), I hope these tutorials will help you along that journey. These are my first postings here, and I am writing this tutorial series because over the years I have seen countless newbies asking the same questions and tripping over the same stumbling blocks, and I thought I might be able to...

MSP430 Launchpad Tutorial - Part 2 - Interrupts and timers

Enrico Garante June 17, 201335 comments

What is an "interrupt"? It is a signal that informs our MCU that a certain event has happened, causing the interruption of the normal flow of the main program and the execution of an "interrupt routine", that handles the event and takes a specified action.

Interrupts are essential to avoid wasting the processor's valuable time in polling loops, waiting for external events (in fact they are used in Real-Time Operating Systems,

MSP430 LaunchPad Tutorial - Part 4 - UART Transmission

Enrico Garante July 3, 201320 comments

Today we are going to learn how to communicate using UART with the Launchpad. For this purpose I will replace the default microcontroller that comes with the board with the MSP430G2553. It is the most powerful device in the MSP430 Value Line and it comes with an integrated hardware UART module, along with 16 Kb of Flash memory, 512 bytes of SRAM and an 8-channel, 10 bit ADC.

UART communication can be useful when dealing with sensors: as a basic example, we could...

VHDL tutorial - part 2 - Testbench

Gene Breniman October 30, 20073 comments

In an earlier article I walked through the VHDL coding of a simple design. In this article I will continue the process and create a test bench module to test the earlier design. The Xilinx ISE environment makes it pretty easy to start the testing process. To start the process, select "New Source" from the menu items under "Project". This launches the "New Source Wizard". From within the Wizard select "VHDL Test Bench" and enter the name of the new module (click 'Next' to...

MSP430 Launchpad Tutorial - Part 1 - Basics

Enrico Garante June 14, 201315 comments

TI's LaunchPad is a complete MSP430 development environment: all you have to do is download and install CCS IDE (login required), connect your G2231-ready LaunchPad to your computer with the included mini-usb cable, and you are ready to code!

Texas Instrument MSP430 LaunchPad

So, let's see how to start a new project in Code Composer Studio. This IDE is derived from Eclipse, so if you used it before you shouldn't have much problems.

We'll write a simple program that will...

MSP430 LaunchPad Tutorial - Part 3 - ADC

Enrico Garante June 25, 20138 comments

In this new episode of our journey into MSP430 I will explain the basics of Analog to Digital Conversion on the MSP430G2231.We will write a program that will read an ADC channel and will toggle some leds based on the result of the conversion. 

We start as usual with the inclusion of the header file for the MSP430G2231, the leds stuff and with the definition of a variable that will store the result of the conversion. We also declare a function that will initialize the ADC...

VHDL tutorial - A practical example - part 3 - VHDL testbench

Gene Breniman June 26, 20116 comments

In part 1 (//www.embeddedrelated.com/showarticle/85.php) of this series we focused on the hardware design, including some of the VHDL definitions of the I/O characteristics of the CPLD part.  In part 2 (//www.embeddedrelated.com/showarticle/87.php), we described the VHDL logic of the CPLD for this design.  In part 3, we will show the entire VHDL design and the associated tests used to prove that we have, in fact, designed what we started out to...

Thermistor signal conditioning: Dos and Don'ts, Tips and Tricks

Jason Sachs June 16, 201112 comments

In an earlier blog entry,  I mentioned this circuit for thermistor signal conditioning:

It is worth a little more explanation on thermistor signal conditioning; it's something that's often done poorly, whereas it's among the easiest applications for signal conditioning.

The basic premise here is that there are two resistors in a voltage divider: Rth is the thermistor, and Rref is a reference resistor. Here Rref is either R3 alone, or R3 || R4, depending on the gain...

Introduction to Microcontrollers - Hello World

Mike Silva September 11, 201313 comments

Embedded Hello World

A standard first program on an embedded platform is the blinking LED.  Getting an LED to blink demonstrates that you have your toolchain set up correctly, that you are able to download your program code into the μC, and that the μC and associated circuitry (e.g. the power supply) is all working.  It can even give you good evidence as to the clock rate that your microcontroller is running (something that trips up a great many people,...

Introduction to Microcontrollers - Further Beginnings

Mike Silva September 1, 20133 comments
Embedded Programming Basics

This tutorial entry will discuss some further embedded programming basics that you will need to understand before proceeding on to the LED blinky and other example programs. We will do this by looking at the general organization and types of instructions found in most microcontrollers, and how that organization and those instructions are reflected (or, in some cases, ignored) by the C programming language.

Basic CPU...