EmbeddedRelated.com
Tutorials
The 2024 Embedded Online Conference

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.


Getting Started With Zephyr: Writing Data to EEPROM

Mohammed Billoo December 6, 20235 comments

In this blog post, I show how to implement a Zephyr application to interact with EEPROM. I show how the Zephyr device driver model allows application writers to be free of the underlying implementation details. Unfortunately, the application didn't work as expected, and I'm still troubleshooting the cause.


Getting Started With Zephyr: Saving Data To Files

Mohammed Billoo October 31, 2023

In this blog post, I show how to implement a Zephyr application to mount a microSD card, create a new file on the microSD card, and write data to it. The lessons learned from such an application can be helpful for devices out in the field that need to write data to off-board memory periodically, especially in cases where Internet access may be sporadic.


Handling Translations in an Embedded Project

Mattia Maldini October 13, 20234 comments

A brief walkthrough on how to handle human language translations in a low level C application. Some options are listed, each with advantages and disadvantages laid out.


nRF5 to nRF Connect SDK migration via DFU over BLE

Mike Voytovich September 7, 20232 comments

This writeup contains some notes on how I was able to migrate one of my clients projects based on the nRF5 SDK, to nRF Connect SDK (NCS) based firmware, via a DFU to devices in the field over BLE.


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.


Bellegram, a wireless DIY doorbell that sends you a Telegram message

Sergio R Caprile July 9, 2023

A wireless button that uses the M5 STAMP PICO and Mongoose to send a Telegram message when pressed. The code is written in C


Getting Started with (Apache) NuttX RTOS Part 2 - Looking Inside and Creating Your Customized Image

Alan C Assis July 5, 2023

In the previous article (https://www.embeddedrelated.com/showarticle/1524.p...) we saw how to run NuttX RTOS using the SIMulator. Today we will see how NuttX's directory tree is organized and how to use the menuconfig to enable some applications, including some tricks to search and solve dependencies.

NuttX Directories organization:

If you have previously compiled the Linux kernel or the U-Boot bootloader you will see that the NuttX source tree organization is very...


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


Cracking the (embedded) Coding Interview

Manasi Rajan March 23, 2023

You never forget the day you land your first job. 

The thrill of receiving that call from your recruiter to tell you that you bagged your dream role! The relief when you finally see the offer letter you’ve been working towards for years. The pride in your parents' voices when you call home and say “Hey look Ma, I’ve made it!”

But before that, there’s the grueling screening process to get through. Tech interviews often last up to three months and companies can have five...


Introduction to Microcontrollers - Beginnings

Mike Silva August 20, 201314 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, 201342 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,


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

Gene Breniman June 25, 20118 comments

In part 1 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, 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 design.

First, let's pull all of the pieces of the prior design together into a...


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


Understanding and Preventing Overflow (I Had Too Much to Add Last Night)

Jason Sachs December 4, 2013

Happy Thanksgiving! Maybe the memory of eating too much turkey is fresh in your mind. If so, this would be a good time to talk about overflow.

In the world of floating-point arithmetic, overflow is possible but not particularly common. You can get it when numbers become too large; IEEE double-precision floating-point numbers support a range of just under 21024, and if you go beyond that you have problems:

for k in [10, 100, 1000, 1020, 1023, 1023.9, 1023.9999, 1024]: try: ...

How to Read a Power MOSFET Datasheet

Jason Sachs September 15, 201514 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...


MSP430 Launchpad Tutorial - Part 1 - Basics

Enrico Garante June 14, 201320 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...


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

Jason Sachs June 15, 201118 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...


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


Introduction to Microcontrollers - Driving WS2812 RGB LEDs

Mike Silva November 14, 201330 comments

This tutorial chapter is a bit of a detour, but I think an interesting and useful one.  It introduces a bit of assembly language programming, and demonstrates bit-banging a tight serial data protocol.  And it deals with RGB LEDs, which are just very fun in their own right, especially these new parts.  So I thought I'd post this to give readers time for some holiday lighting experimenting.

Back To The Future

Remember how we started this...


The 2024 Embedded Online Conference