EmbeddedRelated.com

How to use analog input (ADC) on NuttX RTOS

Alan C Assis September 21, 2024

In all previous tutorial about NuttX we used some type of digital interface (I2C, SPI, etc), so today we will see how to use an analog interface to read some analog sensor or other analog device. In fact we live in an analog world and sometimes we need to read some analog voltage to make sense of some external analog signal. Today we will see how to use the ADC (Analog Digital Converter) from Raspberry Pi Pico RP2040 to read analog voltages.

First let me explain what...


Understanding Yocto Project Layers: A Modular Approach to Embedded Systems Development

Aaksha Jaywant September 16, 2024

In the world of embedded systems, flexibility and modularity are key to managing complex projects efficiently. The Yocto Project, a powerful build system for creating custom Linux distributions, embraces this philosophy through the use of layers. These layers are essentially sets of repositories that contain the instructions and metadata required to build a specific target image. By leveraging layers, developers can modularize their projects, reusing and sharing previously developed metadata...


My friend, the compiler

Ido Gendel September 11, 20244 comments

Modern compilers were given great powers, but we don't always know where and when they'll use them. This may cause us to either worry needlessly or trust unjustifiably, as demonstrated by a little example in this post.


What I Learned From Crashing and Burning in Grad School

Nathan Jones September 4, 20241 comment

Have you ever felt so consumed by something that it started to crowd other parts of your life? So obsessed with success in a particular area that you could hardly think about anything else? I found myself in exactly that spot in 2018 when I first started graduate school; I wanted to succeed so badly that I worked myself to the bone and I let even my marriage and my health suffer in service to it. This state of being is, believe it or not, NOT conducive to success, in neither the long-term nor the short-term. But it took two authors and one pivotal book for me to understand that, to see the pit I had dug for myself, and to begin the path back out. In this blog, I want to share with you my journey in the hopes that you can avoid the mistakes I made.


Small or fast?

Colin Walls August 26, 20244 comments

Developers of software for desktop computers take code optimization for granted. Embedded developers typically need to pay much more attention to the details


Stand-by or boot-up

Colin Walls August 8, 2024

Many factors affect the usability of devices - a key one is how long it takes to start up.


Write Better Code with Block Diagrams and Flowcharts

Nathan Jones August 1, 20241 comment

Reading and writing code without architectural diagrams is like trying to follow complex instructions without any explanatory pictures: nigh impossible! By taking the time to draw out the block diagrams and flowcharts for your code, you can help identify problems before they arise and make your code easier to design, write, test, and debug. In this article, I'll briefly justify the importance of architectural drawings such as block diagrams and flowcharts and then teach you what they are and how to draw them. Using two simple examples, you'll see first-hand how these drawings can significantly amplify your understanding of a piece of code. Additionally, I'll give you a few tips for how to implement each drawing once you've completed it and I'll share with you a few neat tools to help you complete your next set of drawings.


Memory Mapped I/O in C

Mattia Maldini July 25, 20248 comments

Interacting with memory mapped device registers is at the base of all embedded development. Let's explore what tools the C language - standard of the industry - provide the developer with to face this task.


Some Embedded System Software Design Resources

Steve Branam July 23, 2024

I recently received a message from an embedded systems engineer in England asking about a good resource for embedded system software design and easing debugging difficulties.

That's challenging because embedded systems cover such a wide range. There are many possible run-time environments and architectures.

Thus there's no single resource that covers all ground. However, the resources below provide a lot of good material. In aggregate, they make up a good set from which to pull various...


Here Comes The Noise!

GLENN Kirilow July 10, 20241 comment

Noise. That awful thing which nobody wants that most sadly never learn about. It's time to change that with this blog post.


Adventures in Signal Processing with Python

Jason Sachs June 23, 201311 comments

Author’s note: This article was originally called Adventures in Signal Processing with Python (MATLAB? We don’t need no stinkin' MATLAB!) — the allusion to The Treasure of the Sierra Madre has been removed, in deference to being a good neighbor to The MathWorks. While I don’t make it a secret of my dislike of many aspects of MATLAB — which I mention later in this article — I do hope they can improve their software and reduce the price. Please note this...


How to Estimate Encoder Velocity Without Making Stupid Mistakes: Part I

Jason Sachs December 27, 201230 comments

Here's a common problem: you have a quadrature encoder to measure the angular position of a motor, and you want to know both the position and the velocity. How do you do it? Some people do it poorly -- this article is how not to be one of them.

Well, first we need to get position. Quadrature encoders are incremental encoders, meaning they can only measure relative changes in position. They produce a pair of pulse trains, commonly called A and B, that look like...


Ten Little Algorithms, Part 2: The Single-Pole Low-Pass Filter

Jason Sachs April 27, 201516 comments

Other articles in this series:

I’m writing this article in a room with a bunch of other people talking, and while sometimes I wish they would just SHUT UP, it would be...


My Love-Hate Relationship with Stack Overflow: Arthur S., Arthur T., and the Soup Nazi

Jason Sachs February 15, 201551 comments

Warning: In the interest of maintaining a coherent stream of consciousness, I’m lowering the setting on my profanity filter for this post. Just wanted to let you know ahead of time.

I’ve been a user of Stack Overflow since December of 2008. And I say “user” both in the software sense, and in the drug-addict sense. I’m Jason S, user #44330, and I’m a programming addict. (Hi, Jason S.) The Gravatar, in case you were wondering, is a screen...


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


Zebras Hate You For No Reason: Why Amdahl's Law is Misleading in a World of Cats (And Maybe in Ours Too)

Jason Sachs February 27, 20171 comment

I’ve been wasting far too much of my free time lately on this stupid addicting game called the Kittens Game. It starts so innocently. You are a kitten in a catnip forest. Gather catnip.

And you click on Gather catnip and off you go. Soon you’re hunting unicorns and building Huts and studying Mathematics and Theology and so on. AND IT’S JUST A TEXT GAME! HTML and Javascript, that’s it, no pictures. It’s an example of an


Using the Beaglebone PRU to achieve realtime at low cost

Fabien Le Mentec April 25, 20148 comments
Introduction

I work as an engineer in a synchrotron facility. A few weeks ago, I helped the people in charge of the power supply developments to integrate a realtime control algorithm on a prototype platform: a BeagleBone Black (BBB) running Linux. I had already worked with this board in the past, and I found it very interesting given its excellent resources versus price ratio (around 40 euros). This time, I was impressed by its realtime capabilities. I thought it would be a good idea to...


Coroutines in one page of C

Yossi Kreinin August 20, 201315 comments

A coroutine is a function that you can jump back into after returning from it - and it remembers where it was in the code, and all the variables. This is very useful at times.

One use is generating a sequence of values. Here's how you can generate all the x,y pairs in a 2D range in Python:

def iterate(max_x, max_y): for x in range(max_x): for y in range(max_y): yield x,y for x,y in iterate(2,2): print x,y

This prints:

0 0 0 1 1 0 1 1

The yield keyword is like...


StrangeCPU #1. A new CPU

Victor Yurkovsky February 24, 20136 comments

Summary: In this multi-part series I will share with you a design, implementation notes and code for a slightly different kind of a CPU featuring a novel token machine that resolves an 8-bit token to pretty much any address in a 32-bit or even 64-bit address space, using not much more than an adder.

Table of Contents:
  • Part 1: A new CPU - technology review, re-examination of the premises;  StrangeCPU concepts; x86 notes.

2022 Embedded Online Conference - Final Push!

Stephane Boucher April 8, 2022

With the Embedded Online Conference only a couple of weeks away, we are now doing a final push to ensure that as many engineers as possible who could benefit from the conference are aware of it. 

If you'd like to help us spread the word, not only will you make our day, but you'll also earn a chance to win one of TWO Saleae Logic Pro 8.     

Prize: TWO Saleae Logic Pro 8Raffle...

The 2021 DSP/ML Online Conference

Stephane Boucher September 29, 2021

The 2021 DSP/ML Online Conference is just around the corner and this year again, the program is packed with opportunities to learn. 

By registering for the conference, not only will you have full access to all talks, workshops, and Q&A sessions at this year's event, but you'll also gain instant access to all talks from last year's edition.  

We've asked the speakers to tell me a few words about their sessions, here are some of the answers we've...


Embedded Online Conference 2021 - Watch the Speakers Share their Thoughts on the Value for Attendees

Stephane Boucher May 4, 20212 comments

Over the last few weeks, we've had a chance to chat with some of the speakers at the upcoming Embedded Online Conference.  We asked them to share their thoughts on conferences and the Embedded Online Conference in particular.  Here are their answers edited together in one video:

  

If you are not registered yet for the conference but are considering it, please make sure to use the promo code ER149 to save more than 40% on your registration...


8 Weeks - 8 Giveaways!

Stephane Boucher March 10, 2021

If for some reason, you've been putting off registering for the upcoming 2021 Embedded Online Conference, here are 8 good reasons to register today.

The idea is simple; if you are registered for the conference by the 'raffle date' for any of the following giveaways, you'll automatically be entered into the draw.

So for instance, if you are already registered for the conference or register before March the 22nd, you'll be automatically entered into the 8 draws...


Announcing the 2021 Embedded Online Conference!

Stephane Boucher January 27, 20211 comment

Once again this year, Jacob Beningo and I are putting together the Embedded Online ConferenceLast year's edition was a very rewarding experience, with over 6,000 registrants, fantastic & insightful talks, and lots of positive feedback.  For this year's edition, we are delighted to announce that none other than Jack Ganssle will be giving a Keynote presentation about the 50th anniversary of the Microprocessor.

The 2021 Embedded Online Conference will...


The DSP Online Conference - Right Around the Corner!

Stephane Boucher September 20, 2020

It is Sunday night as I write this blog post with a few days to go before the virtual doors of the very first DSP Online Conference open..

It all started with a post in the DSPRelated forum about three months ago.  We had just had a blast running the 2020 Embedded Online Conference and we thought it could be fun to organize a smaller event dedicated to the DSP community.  So my goal with the post in the forum was to see if...


Already 3000+ Attendees Registered for the Upcoming Embedded Online Conference

Stephane Boucher February 14, 2020

Chances are you already know, through the newsletter or banners on the Related sites, about the upcoming Embedded Online Conference.

Chances are you also already know that you have until the end of the month of February to register for free. 

And chances are that you are one of the more than 3000 pro-active engineers who have already registered.

But If you are like me and have a tendency to do tomorrow what can be done today, maybe you haven't registered yet.  You may...


Free Goodies from Embedded World - Full Inventory and Upcoming Draw Live-Streaming Date

Stephane Boucher March 22, 20191 comment

Chances are that you already know that I went to Embedded World a few weeks ago and came back with a bag full of "goodies".  Initially, my vision was to do a single draw for one person to win it all, but I didn't expect to come back with so much stuff and so many development kits.   Based on your feedback, it seems like you guys agree that It wouldn't make sense for one person to win everything as no-one could make good use of all the boards and there would be lots of...


Free Goodies from Embedded World - What to Do Next?

Stephane Boucher March 6, 20193 comments

I told you I would go on a hunt for free stuff at Embedded World in order to build a bundle for someone to win.


Back from Embedded World 2019 - Funny Stories and Live-Streaming Woes

Stephane Boucher March 1, 20191 comment

When the idea of live-streaming parts of Embedded World came to me,  I got so excited that I knew I had to make it happen.  I perceived the opportunity as a win-win-win-win.  

  • win #1 - Engineers who could not make it to Embedded World would be able to sample the huge event, 
  • win #2 - The organisation behind EW would benefit from the extra exposure
  • win #3 - Lecturers and vendors who would be live-streamed would reach a (much) larger audience
  • win #4 - I would get...